0

MPMoviePlayerControlleriPhoneアプリでビデオを再生するために使用しています。

の再生中にMPMoviePlayerControlleriPhone のホームボタンを押して、アプリをバックグラウンドにします。

次に、アプリのアイコンをタップしてアプリをフォアグラウンドにすると、MPMoviePlayerControllerビューは短時間、約 1 ~ 15 秒間黒い画面になります。

MPMoviePlayerControllerアプリがフォアグラウンドになったときにすぐに のビデオを表示する方法は?

スペシャルthx!:D

4

1 に答える 1

-2

NSURL *movieURL = [NSURL URLWithString:@"http://......"];

// Initialize a movie player object with the specified URL

self.moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:movieURL];

self.moviePlayer.controlStyle = MPMovieControlStyleFullscreen;

[self.moviePlayer.view setFrame:self.view.bounds];

[self.view addSubview:self.moviePlayer.view];

[self.moviePlayer play];

これがお役に立てば幸いです。

于 2013-05-21T12:18:40.713 に答える