在 MPMoviePlayerController 上调用播放后,电影播放有一些延迟
我正在开发一个 iPhone 应用程序,在其中使用 MPMoviePlayerController 播放视频。
有时,在我在 MPMoviePlayerController
上调用播放后,某些视频不会立即播放。
我已调用prepareToPlay,并在MPMediaPlaybackIsPreparedToPlayDidChangeNotification
的通知方法中,我正在MPMoviePlayerController
上调用播放。
有人可以帮助找出这里的问题吗?
谢谢, 拉克斯米拉尔
I am developing an iPhone application in which I play videos using MPMoviePlayerController
.
Sometimes, some of the videos don't play immediately after I call play on MPMoviePlayerController
.
I have called prepareToPlay and in the notified method of MPMediaPlaybackIsPreparedToPlayDidChangeNotification
, I am calling play on MPMoviePlayerController
.
Could someone help in identifying the problem here?
Thanks,
Laxmilal
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从我在类似线程中的回答(reducing-the-initial-播放远程视频内容时延迟) - 注意解决方案的此片段对于远程和本地视频内容均有效。
初始化时使用
MPMoviePlayerController.movieSourceType
属性播放器减少媒体
识别延迟。
来自 MPMoviePlayerController 类参考 :
From my answer in a similar thread (reducing-the-initial-delay-when-playing-remote-video-content) - Note this fragment of the solution is valid for both, remote and local video content.
Use the
MPMoviePlayerController.movieSourceType
property when initializing yourplayer to cut down the media
recognition delay.
From the MPMoviePlayerController Class Reference: