I'm having a weird issue with MPMoviePlayerViewController
.
public override void ViewDidLoad()
{
base.ViewDidLoad();
var f = new MPMoviePlayerViewController(NSUrl.FromString("http://www.w3schools.com/html/mov_bbb.mp4"));
f.MoviePlayer.ShouldAutoplay = true;
f.MoviePlayer.PrepareToPlay();
f.MoviePlayer.Play();
View.AddSubview(f.View);
}
After playback begins, the screen will go blank in a few seconds before the video finishes. Controls disappear as well. I tried using MPMoviePlayerController
, which worked fine except that the rotation point seems to be the center so when you go from portrait to landscape, the video goes out of the screen and comes back. MPMoviePlayerViewController
has built-in resizing on orientation change, but it's not working properly.