AVPlayer 与 MPMoviePlayer
在我的应用程序中,我必须播放 .m3u8 类型的视频。 这些不是本地视频。我可以使用 MPMoviePlayerController 或 AVPlayer 来实现。当播放某些广告时,我还必须忽略用户交互。另外我还必须提供一个 Airplay 选项。
我应该使用哪个播放器?
谢谢。
In my application I have to play videos of type .m3u8. These are not local video. I can do it either with MPMoviePlayerController or AVPlayer. I also have to ignore userinteraction when some advertisement is getting played. Also I have to give an option for Airplay.
Which player should I use?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
AVPlayer 有一个名为 AVQueuePlayer 的子类,它允许您按顺序播放多部电影。这对您的广告很有帮助。 AVplayer 目前不支持 Airplay。
从 iOS 5 开始,AVplayer 可以选择通过启用 useAirPlayVideoWhileAirPlayScreenIsActive 属性来在 Airplay 上自动开始播放(如果还启用了 allowedAirPlayVideo)
据我所知,您无法使用 MPMoviePlayer 自动播放 Airplay,用户必须点击 Airplay 图标。
AVPlayer has a subclass called AVQueuePlayer which allows you to play back several movies in a sequence. It would be helpful for you for your ads. AVplayer currently does not support Airplay.
From iOS 5 AVplayer has an option to start playing back automatically on Airplay by enabling usesAirPlayVideoWhileAirPlayScreenIsActive property (if allowsAirPlayVideo is also enabled)
As far as I know you cannot play on airplay automatically with MPMoviePlayer, user has to tap on the Airplay icon.