mp4 与 m3u8 格式
我正在尝试在 iPhone 中播放 m3u8 格式的视频。视频的链接是从 XML 解析的(所以我无法更改它)。我正在尝试使用 MoviePlayerController 来播放它(将其设置为全屏,controlStyle 也是全屏,将 presentModalViewController 设置为 MoviePlayerController)。按下播放按钮后,电影只有几秒钟的声音,没有视频屏幕,并且应用程序崩溃。
在此 XML 中,我有一个不同的视频链接,其中包含 mp4 格式。以相同的模式播放视频(使用 MoviePlayerController 和设置...),效果很好。那么:您知道问题是什么吗? m3u8的编码有问题吗?如果可以改变又如何改变?
谢谢 :)
I am trying to play a video in iPhone, which has m3u8 format. The video's link is parsed from an XML (so i cannot change it). I'm trying to play it with MoviePlayerController (set it on fullscreen, controlStyle is fullscreen too, set the presentModalViewController to the MoviePlayerController). After pressing the play button, the movie has only sound for a few seconds, no video screen, and the app crashes.
In this XML I have a different videolink, which contains mp4 format. Playing the video in the same mode (with MoviePlayerController and the settings...), it works fine. So: do you have any ideas what the problem is? If there is any encoding problems of m3u8? If it can be changed and how?
Thank you :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
从 Peter Steinberger 发布的这个非常有用的开源控件中查看 AVPlayerDemoPlaybackViewController 类
https://github.com/steipete/PSPushPopPressView
再次感谢彼得!
Look the AVPlayerDemoPlaybackViewController class from this very useful open source control released by Peter Steinberger
https://github.com/steipete/PSPushPopPressView
Thanks again Peter!