MPMoviePlayerController和本地m3u8文件 [英] MPMoviePlayerController and local m3u8 files

查看:183
本文介绍了MPMoviePlayerController和本地m3u8文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试加载保存到本地文件系统的m3u8文件,但是MPMoviePlayerController拒绝播放它,引用m3u8不是支持的媒体类型。但是,当我在远程媒体服务器上访问它时,同样的m3u8文件播放完美。是否有任何解决方法可以用于播放本地m3u8文件?

I'm trying to load an m3u8 file that's saved to the local filesystem, but the MPMoviePlayerController refuses to play it, citing "m3u8 is not a supported media type". However, the same m3u8 file plays perfectly fine when I'm accessing it on a remote media server. Is there any workaround that can be used to play local m3u8 files?

推荐答案

,它只能通过HTTP完成。就个人而言,我认为当文件可以通过文件协议访问时,需要HTTP是愚蠢的,但是他们是休息。我刚刚使用简单的HTTP服务器来投放m3u8文件和后续的ts文件。

Well, according the RFC they lay out for m3u8 streaming, it can only be done over HTTP. Personally, I think it's kind of silly to require HTTP when the files can be readily accessed through the file protocol, but them's the breaks. I just used a simple HTTP server to serve the m3u8 file and the subsequent ts files.

这篇关于MPMoviePlayerController和本地m3u8文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆