Scott Bartgis Member Licensed User Longtime User Mar 14, 2016 #1 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. Code: Copy { player = [[MPMoviePlayerViewController alloc]initWithContentURL:url]; player.moviePlayer.fullscreen = YES; player.moviePlayer.scalingMode = MPMovieScalingModeAspectFill; }
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. Code: Copy { player = [[MPMoviePlayerViewController alloc]initWithContentURL:url]; player.moviePlayer.fullscreen = YES; player.moviePlayer.scalingMode = MPMovieScalingModeAspectFill; }
Erel B4X founder Staff member Licensed User Longtime User Mar 14, 2016 #2 Code: Copy Dim no As NativeObject = VideoView1 no = no.GetField("player").GetField("moviePlayer") no.SetField("fullscreen", true) no.SetField("scalingMode", 2) 'change to 1 for AspectFit Upvote 0
Code: Copy Dim no As NativeObject = VideoView1 no = no.GetField("player").GetField("moviePlayer") no.SetField("fullscreen", true) no.SetField("scalingMode", 2) 'change to 1 for AspectFit
Scott Bartgis Member Licensed User Longtime User Mar 14, 2016 #3 That sounds easy and I have implemented it. It errors out on this line Code: Copy 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. Click to expand... Upvote 0
That sounds easy and I have implemented it. It errors out on this line Code: Copy 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. Click to expand...
Erel B4X founder Staff member Licensed User Longtime User Mar 14, 2016 #4 The code you posted is wrong. There is no moviePlayer property. Remove the .GetField("moviePlayer"). Upvote 0
Scott Bartgis Member Licensed User Longtime User Mar 14, 2016 #5 Yay - for Erel, that worked. Boo - for StackOverflow post. I don't have enough cred to reply, but if anyone else wants to: http://stackoverflow.com/questions/7179802/ios-force-full-screen-video Upvote 0
Yay - for Erel, that worked. Boo - for StackOverflow post. I don't have enough cred to reply, but if anyone else wants to: http://stackoverflow.com/questions/7179802/ios-force-full-screen-video
JanPRO Well-Known Member Licensed User Longtime User Mar 14, 2016 #6 Erel, can you explain why it is possible to access this native property although VideoView is no objectwrapper? Jan Upvote 0
Erel, can you explain why it is possible to access this native property although VideoView is no objectwrapper? Jan
Erel B4X founder Staff member Licensed User Longtime User Mar 15, 2016 #7 JanPRO said: Erel, can you explain why it is possible to access this native property although VideoView is no objectwrapper? Click to expand... 'player' is an internal field of this type. Upvote 0
JanPRO said: Erel, can you explain why it is possible to access this native property although VideoView is no objectwrapper? Click to expand... 'player' is an internal field of this type.
JanPRO Well-Known Member Licensed User Longtime User Mar 15, 2016 #8 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
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.