How to play .m3u8 file with data stream using AudioStreamer?
I have a streaming iOS app that is integrated with AudioStreamer
. It works great for my streaming urls. But suddenly the streaming url in .m3u8 format changed. How can I use AudioStreamer
for the url of the .m3u8 file?
I can't use MPMoviePlayer
it because I want to show some buffering before loading the stream. This can be done easily with AudioStreamer
. How to use AudioStreamer
to play .m3u8 file?
thank
source to share
Try and parse the m3u8 file and get the actual url of the resource and then pass that url to AudioStreamer.
Here you can find M3U8Parser lib, which analyzes 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
source to share