开发者

Why does my MPMoviePlayerController suddenly change load state to unknown?

My app is a digital magazine consisting of many pages. Some pages have video embedded in the开发者_C百科m. I am using MPMoviePlayerViewController for the video playback.

The problem is that once I get to any page where the next page also contains a video then the video appears briefly then blanks out. I've switched out video files, so I know it isn't the files themselves.

When the page loads offscreen ready to be scrolled into view the load state changes to 3 = MPMovieLoadStatePlayable + MPMovieLoadStatePlaythroughOK (all good). Then when a second MPMoviePlayerController is loaded, the load state of the original suddenly changes to 0 (MPMovieLoadStateUnknown).

In the docs for MPMoviePlayerController it says

Note: Although you can create multiple MPMoviePlayerController objects and present their views in your interface, only one movie player at a time can play its movie.

I read this to mean I can't play more than one at a time but does this it also mean I can't even load up more than one movie at a time?


It turns out you can't even load more than one MPMoviePlayerController at a time. You can create the object but if you supply a URL to more than one then one will get unloaded.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜