How do I play HLS video with multiple resolutions (m3u8 playlist)?

1.2k views Asked by At

How do I play HLS video with multiple resolutions?

My HLS player list.

Filename: test.m3u8

#EXTM3U
#EXT-X-VERSION:3
#EXT-X-INDEPENDENT-SEGMENTS
#EXT-X-STREAM-INF:BANDWIDTH=1239627,AVERAGE-BANDWIDTH=1239627,CODECS="avc1.77.30,mp4a.40.2",RESOLUTION=640x360,FRAME-RATE=29.970
test_360.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=2361685,AVERAGE-BANDWIDTH=2361685,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=960x540,FRAME-RATE=29.970
test_540.m3u8
#EXT-X-STREAM-INF:BANDWIDTH=3436127,AVERAGE-BANDWIDTH=3436127,CODECS="avc1.4d401f,mp4a.40.2",RESOLUTION=1280x720,FRAME-RATE=29.970
test_720.m3u8

How do this in my react app? I tried using Video JS but I was not able to play the file. Please let me know how to play this video.

0

There are 0 answers