iOS Question MPMovieScalingModeAspectFill

Nicolás Cieri

Active Member
Licensed User
Hi, is possible to use MPMovieScalingModeAspectFill with VideoPlayer?

Maybe something like this...

B4X:
    Dim no As NativeObject = VideoPlayer1
    Dim pl As NativeObject = no.GetField("controller").GetField("player")
    pl.SetField("fullscreen", True)
    pl.SetField("scalingMode", 2) 'change to 1 for AspectFit
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
B4X:
VideoPlayer1.LoadVideoUrl("https://clips.vorwaerts-gmbh.de/big_buck_bunny.mp4")
Wait For VideoPlayer1_Ready (Success As Boolean)
If Success Then
   Dim no As NativeObject = VideoPlayer1
   no.GetField("controller").SetField("videoGravity", "AVLayerVideoGravityResizeAspectFill")
   VideoPlayer1.Play 'to start playing automatically
End If
 
Upvote 0
Top