【发布时间】:2013-06-21 01:03:08
【问题描述】:
我正在尝试在我的应用中流式传输视频。我找到的方法是:
NSURL *theMovieURL = [NSURL URLWithString:self.data.trailer];
if (theMovieURL)
{
self.movieController = [[MPMoviePlayerViewController alloc] initWithContentURL:theMovieURL];
[self presentMoviePlayerViewControllerAnimated:self.movieController];
[self.movieController.moviePlayer play];
}
我不确定它是否是最传统的,但它确实有效。
问题是我不知道如何允许横向模式,仅用于视频。我应该使用 shouldAutorotate 或 shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation 之类的东西吗?如何使用?
仅供参考,整个应用只允许纵向模式。
感谢您的帮助。
【问题讨论】:
标签: ios mpmovieplayercontroller landscape