AVPlayer not playing m3u8 from local file

后端 未结 2 1012
生来不讨喜
生来不讨喜 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 16:10

    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.

提交回复
热议问题