How to play .m3u8 file streaming url with AudioStreamer?

1.8k views Asked by At

I have an iOS streaming app, that is integrated with AudioStreamer. It works fine for my streaming urls. But suddenly thay have change the streaming url into .m3u8 format. How can I use AudioStreamer for .m3u8 file url?

I cant use MPMoviePlayer because I want to show some buffering before load the stream. It can easily done with the AudioStreamer. How can I use AudioStreamer to play an .m3u8 file?

Thank you

1

There are 1 answers

0
Adi Pop On BEST ANSWER

Try and parse the m3u8 file and get the actual URL to the resource and then pass that URL to AudioStreamer.

Here you can find M3U8Parser lib that parse the playlist.

Below is an example of m3u8 format:

#EXTM3U
#EXT-X-TARGETDURATION:10

#EXT-X-MEDIA-SEQUENCE:1

#EXTINF:10,
http://video.example.com/segment0.ts
#EXTINF:10,
http://video.example.com/segment1.ts
#EXTINF:10,
http://video.example.com/segment2.ts
#EXT-X-ENDLIST