开发者

white screen before MPMoviePlayerViewController

开发者 https://www.devze.com 2023-03-04 22:15 出处:网络
i am streaming a video from a server, it works perfectly using MPMoviePlayerViewController. but the problem is that if the size of the video is too big a white screen will show before the MPMoviePlaye

i am streaming a video from a server, it works perfectly using MPMoviePlayerViewController.

but the problem is that if the size of the video is too big a white screen will show before the MPMoviePlayerViewController connects and starts playing the video.

this is annoying, and i have no clue how to fix it.

this is the code i am using to play the video:

NSString *videoURLString = @"http://serverAdress/test/videotest/starwars.mp4";
NSURL *videoURL = [NSURL URLWithString:videoUR开发者_StackOverflow中文版LString];
MPMoviePlayerViewController *moviePlayerView = [[[MPMoviePlayerViewController alloc] initWithContentURL:videoURL] autorelease];
[self presentMoviePlayerViewControllerAnimated:moviePlayerView];


Try something like this:

 moviePlayerView.view.backgroundColor = [UIColor blackColor];

Resource: MPMoviePlayerController shows blank white screen before launch?

0

精彩评论

暂无评论...
验证码 换一张
取 消