开发者

MPMoviePlayerViewController, what if it fails?

I'm creating an application to scan barcodes and provide video information on the scanned product. I'm running into the problem where the MPMoviePlayerViewController ends up giving me a wh开发者_StackOverflow社区ite screen if a video url is not valid. It should just go back to the previous screen if no video is available. How do I handle this exception? I can't find any delegate methods etc..

Thanks in advance,

Lewion


You can register yourself for a few notifications for MPMoviePlayer controller which is moviePlayer property of MPMoviePlayerViewController , these notifications should handle these error situations.

PlaybackDidFinish or PreloadDidFinish and couple of new ones with SDK 4.0+ , like StateChanged ... these come with userinfo dicitonary object from which you can detect error(s).

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜