ビデオの再生を開始するとすぐに MPMoviePlayerViewController を強制的にフルスクリーンで再生する方法を教えてください。setFullScreen:animated: 関数を試しましたが、機能しません。それで、誰かがこれから私を助けることができますか?前もって感謝します。
また、アプリケーション バンドルのビデオ ファイルのみを使用しています。
これで私の問題は解決しました。
NSURL *movieUrl = [NSURL fileURLWithPath: [[NSBundle mainBundle] pathForResource:@"appVid"
ofType:@"mp4"]];
moviePlayer = [[MPMoviePlayerController alloc]initWithContentURL:movieUrl];
moviePlayer.controlStyle = MPMovieControlStyleFullscreen;
moviePlayer.scalingMode = MPMovieScalingModeAspectFill;
moviePlayer.shouldAutoplay = YES;
moviePlayer.view.frame = [[UIApplication sharedApplication]keyWindow].bounds;
[[[UIApplication sharedApplication]keyWindow] addSubview:moviePlayer.view];
[moviePlayer setFullscreen:YES animated:YES];
[moviePlayer play];