AVPlayer not playing m3u8 from local file

谁说我不能喝 提交于 2019-12-01 09:37:20

m3u/m3u8 files must be stored on a server and streamed in order to be played(I know it sounds not reasonable, but Apple did it again). You must use HLS, which basically means you should store the file on a server and directly access it from there. You can as well create a local Server inside your app using a framework like GCD WebServer.

As of iOS 10 you can download HLS streams using AVAssetDownloadURLSession . This will result in a local asset path that can be played offline.

If you are trying to embed a video in your app bundle you would be better off just creating an MP4.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!