Android Question [RESOLVED] Movie "Stretch"

MarcoRome

Expert
Licensed User
Longtime User
Hi all. I have mp4 and if i use this code (only VideoView ):

B4X:
Sub Globals
   Dim vv As VideoView
End Sub

Sub Activity_Create(FirstTime As Boolean)  
    vv.Initialize("vv")
    Activity.AddView(vv, 0dip, 0dip, 100%x, 100%y)  
   File.Copy(File.DirAssets, "vidfield.m4v", File.DirRootExternal, "vidfield.m4v")
   vv.LoadVideo(File.DirRootExternal, "vidfield.m4v")
   vv.Play  
End Sub

i have that i see movie only 1/3 with this effect:

Screenshot_2016-04-20-17-23-49[1].jpg


Now, if i use VideoViewExtension by @warwound with this code:

B4X:
Sub Globals
   Dim vv As VideoView
End Sub

Sub Activity_Create(FirstTime As Boolean)

   '   http://www.b4x.com/android/help/audio.html#videoview
   '   this is the basic VideoView example modified to use ViewViewExtras and it's VideoViewRelativeLayout1 object
  
    vv.Initialize("vv")
  
   '   create and Initialize the VideoViewRelativeLayout1
   Dim VideoViewRelativeLayout1 As VideoViewRelativeLayout
   VideoViewRelativeLayout1.Initialize
   '   add the VideoView to the VideoViewRelativeLayout1
   VideoViewRelativeLayout1.SetVideoView(vv)
  
   'Now add the VideoViewRelativeLayout1 to the Activity
   Activity.AddView(VideoViewRelativeLayout1, 0dip, 0dip, 100%x, 100%y)
  
   File.Copy(File.DirAssets, "vidfield.m4v", File.DirRootExternal, "vidfield.m4v")
   vv.LoadVideo(File.DirRootExternal, "vidfield.m4v")
   vv.Play
  
End Sub

i have that i see movie for all screen, but as the movie is ** STRETCH ** with this effect:

tempFileForShare_2016-05-10-05-44-37.jpg


Is possible one thing type zoom effect without having the STRETCH film like the following image:

tempFileForShare_2016-05-10-06-10-19.jpg


Any solution ?
Thank you
Marco
 
Top