【发布时间】:2012-10-08 12:58:58
【问题描述】:
我正在使用 MPMoviePlayerViewController(用于将在 iPhone 4 和 iPhone 5 上运行的应用程序),如下所示:
NSURL *videoURL = [NSURL fileURLWithPath:[[NSBundle mainBundle] pathForResource:videoFile ofType:videoType]];
MPMoviePlayerViewController *moviePlayerVC = [[MPMoviePlayerViewController alloc] initWithContentURL:videoURL];
moviePlayerVC.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentViewController:moviePlayerVC animated:YES completion:nil];
MPMoviePlayerController *moviePlayer = moviePlayerVC.moviePlayer;
// Register to receive a notification when the movie has finished playing.
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerPlaybackDidFinishNotification
object:moviePlayer];
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(moviePlayBackDidFinish:)
name:MPMoviePlayerDidExitFullscreenNotification
object:moviePlayer];
[moviePlayer prepareToPlay];
[moviePlayer play];
但视频编辑人员需要知道要使用的视频大小(即同时满足 iPhone 4 和 iPhone 5 的需求)。
在此处查看 Apple 的文档:http://developer.apple.com/library/ios/ipad/#documentation/Miscellaneous/Conceptual/iPhoneOSTechOverview/MediaLayer/MediaLayer.html
在视频技术下它指出:
640 x 480 像素
那么,哪种视频尺寸最适合 iPhone 4 和 5。
例如,视频编辑器是否应该以 640 x 480 像素导出视频?
还是应该以 1136 x 640(即 iPhone 5 的屏幕尺寸)导出?
或者可能是 960 x 640 (iPhone 4)?
【问题讨论】: