简体   繁体   中英

How to play .m3u8 file streaming url with AudioStreamer?

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM