呈现 MPMoviePlayerViewController 时出现空白白屏
有人在 MPMoviePlayerViewController 显示时出现白屏时遇到问题吗?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
MPMoviePlayerViewController* mpViewController = [[MPMoviePlayerViewController alloc] init];
[[mpViewController moviePlayer] setContentURL: [NSURL URLWithString:@"http://burtonliftline.com/site-media/uploads/videos/ad_to_fakie-the_liftline_1.mp4"]];
[self presentMoviePlayerViewControllerAnimated:mpViewController];
}
Anybody have trouble with an MPMoviePlayerViewController giving a white screen when it is presented?
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
MPMoviePlayerViewController* mpViewController = [[MPMoviePlayerViewController alloc] init];
[[mpViewController moviePlayer] setContentURL: [NSURL URLWithString:@"http://burtonliftline.com/site-media/uploads/videos/ad_to_fakie-the_liftline_1.mp4"]];
[self presentMoviePlayerViewControllerAnimated:mpViewController];
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我假设您在电影加载时只是看到空白控制器。您是否尝试过将视图控制器的背景设置为黑色?
[mpViewController setBackgroundColor:[UIColor blackColor]];
I assume you're just seeing the blank controller while the movie is loading. Have you tried setting the view controller's background to black?
[mpViewController setBackgroundColor:[UIColor blackColor]];
令人尴尬的是,我的问题是我的视频不想从服务器在 iPhone 上播放。当我尝试从 safar 流式传输该视频时,它向我发送了此错误“服务器配置不正确”。我需要指向 http://media.burtonliftline.com /site-media/uploads/videos/ad_to_fakie-the_liftline_1.mp4
Embarrassing but my problem was that my video wasnt wanting to play on the iPhone from the server. It was shooting me this error when I tried to stream that video from safar "the server is not correctly configured". I needed to be pointing to http://media.burtonliftline.com/site-media/uploads/videos/ad_to_fakie-the_liftline_1.mp4