iOS Question ObjC for movie player fullscreen

Scott Bartgis

Member
Licensed User
Is it possible to instruct the VideoView to go fullscreen programmatically? I found a snipped of ObjC that loads a URL and sets fullscreen, but could it be made a function to call via NativeMethod with the param of the VideoView that we want to go fullscreen? This is only to save the user from needing to click the fullscreen button. It's not critical, but would be nice to figure out.

B4X:
{
    player = [[MPMoviePlayerViewController alloc]initWithContentURL:url];
    player.moviePlayer.fullscreen = YES;
    player.moviePlayer.scalingMode = MPMovieScalingModeAspectFill;
}
 

Scott Bartgis

Member
Licensed User
That sounds easy and I have implemented it. It errors out on this line

B4X:
no = no.GetField("player").GetField("moviePlayer")

This is the error:

[<MPMoviePlayerController 0x14e76e30> valueForUndefinedKey:]: this class is not key value coding-compliant for the key moviePlayer.
 
Upvote 0

JanPRO

Well-Known Member
Licensed User
Ok, it would be great to have a hidden property like "nativePlayer" (also for other librarys which aren't objectwrapper), without we would need the source to get the name of such internal fields to access the native object.
 
Upvote 0
Top