AVPlayer not playing m3u8 from local file

后端 未结 2 1008
生来不讨喜
生来不讨喜 2021-01-14 15:41

I am trying to get AVPlayer to play a m3u8 playlist that is a local file.

I have narrowed this down to a simple test case using one of Apple\'s sample playlists:

2条回答
  •  轮回少年
    2021-01-14 15:49

    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.

提交回复
热议问题