我使用MPMoviePlayerViewController在iPhone4(iOS5.1),新iPad(iOS5.1),iPad(iOS4.2)的iOS应用中播放视频.
I use MPMoviePlayerViewController to playback videos in my iOS app on iPhone4 (iOS5.1), new iPad (iOS5.1), iPad (iOS4.2).
播放视频时,我按了两次主屏幕按钮,显示了多任务底座,播放器暂停了.
I press home button twice when playing a video, the multitask dock shows and player pauses.
我试图在appDelegate applicationWillResignActive中调用播放器的play方法,但是没有用.
I have tried to call player's play method in appDelegate applicationWillResignActive,but it didn't work.
有人知道如何避免玩家停顿吗?
Does anyone know how to do to avoid player pause ?
另一个问题,如何在遥控面板上显示视频的标题? (将多任务扩展坞滑动到最左侧).
Another question, how to show video's title on remote control panel? (swipe multitask dock to leftmost).
谢谢.
推荐答案我认为您不应该继续播放视频.根据《 Apple App编程指南》,您应该在发生这种情况时暂停应用程序中的视觉活动.我不能100%确定App Store提交的内容是否会接受该行为.
I don't think you shouldn't continue playing the video. According to Apple App Programming Guide, you are supposed to pause visual activity in the application when that happens. I am not 100% sure if the App Store submission will accept that behavior.
您可以通过向MPNowPlayingInfoCenter提供元数据来显示视频标题:
You can show the video title by providing metadata to the MPNowPlayingInfoCenter:
在此处查看
如此处所写:
系统在设备锁定屏幕和多任务UI的多媒体控件中显示正在播放的信息.
The system displays now-playing information on the device lock screen and in the multimedia controls in the multitasking UI.
更多推荐
保持MPMoviePlayerViewController在后台播放
发布评论