Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Toggle quality between diffrent m3u8 files


I have the following setup:
var playerInstance = jwplayer("jwp1");
playerInstance.setup({
sources: [{
file: "http://proxy-042.dc3.dailymotion.com/sec(8980f3491562a2a0adf23aff769ac80a)/video/790/685/356586097_mp4_h264_aac_hd.m3u8",
"default": "true"
},{
file: "http://proxy-042.dc3.dailymotion.com/sec(ffa948aaa08563e49a5cf4dcf967b018)/video/790/685/356586097_mp4_h264_aac.m3u8"
},{
file: "http://proxy-042.dc3.dailymotion.com/sec(a8f6b21d155aa6b12fc35139abc976da)/video/790/685/356586097_mp4_h264_aac_ld.m3u8"
}]
});

I want to be able to toggle between the diffrent m3u8 streams(each have only 1 strean / 1 quality)
But it only loads one and set the other as fallback.

I've tried to read all of the articles about it, There was a SMIL manifest article that got deleted, The new article does not specify how to set a manifest to be able to toggle between diffrent m3u8 files.
Can someone please help?

5 Community Answers

George

JW Player Support Agent  
0 rated :

Hi,

The correct way to handle multiple qualities with HLS is to have a master manifest that defines the qualities.

Example:
http://content.jwplatform.com/manifests/Y5UQq0fG.m3u8

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=490000,RESOLUTION=480×270,CODECS=“mp4a.40.2,avc1.77.30”,CLOSED-CAPTIONS=NONE
http://videos-f.jwpsrv.com/content/conversions/WuLZ6wZE/videos/Y5UQq0fG-21914600.mp4.m3u8?token=0_598a2e0a_0x15d0030875b1e15be16ce86585690ce2f22d4955
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1370000,RESOLUTION=1280×720,CODECS=“mp4a.40.2,avc1.77.30”,CLOSED-CAPTIONS=NONE
http://videos-f.jwpsrv.com/content/conversions/WuLZ6wZE/videos/Y5UQq0fG-21914602.mp4.m3u8?token=0_598a2e0a_0x9cc571bce7e8a9d1c9c83dbdc8548d791b7867db
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=630000,RESOLUTION=720×406,CODECS=“mp4a.40.2,avc1.77.30”,CLOSED-CAPTIONS=NONE
http://videos-f.jwpsrv.com/content/conversions/WuLZ6wZE/videos/Y5UQq0fG-21914601.mp4.m3u8?token=0_598a2e0a_0xc1879349312ab8e6b9913ab69263f6840ccfb024
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=340000,RESOLUTION=320×180,CODECS=“mp4a.40.2,avc1.77.30”,CLOSED-CAPTIONS=NONE
http://videos-f.jwpsrv.com/content/conversions/WuLZ6wZE/videos/Y5UQq0fG-21914599.mp4.m3u8?token=0_598a2e0a_0x8569ea5e8c44d93a8cfa03b2e5e19eca1c722fe4
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=120000,CODECS=“mp4a.40.2”
http://videos-f.jwpsrv.com/content/conversions/WuLZ6wZE/videos/Y5UQq0fG-21914604.m4a.m3u8?token=0_598a2e0a_0xcb273033665db09ad995f2058dcb9608fbfe7719

Majon

User  
0 rated :

And if I only have access to the sub manifests and not the master?
Can't it be done just like the other formats?
It's pretty basic.

George

JW Player Support Agent  
0 rated :

It cannot, because HLS wasn’t designed for that. You should have access to or create a master manifest.

Majon

User  
0 rated :

After creasting a master manifest, the quality toggle is working on desktop mode, However, is not shown on mobile mode.
Not even the first 2 modes according to your documantation.

How can I set the quality toggle in mobile mode as well with a master manifest file as stated?

George

JW Player Support Agent  
0 rated :

On mobile HLS is rendered natively, there never was a HD button on mobile when using HLS. The HD button would only show if you’re using MP4 sources.

This question has received the maximum number of answers.