hls.js icon indicating copy to clipboard operation
hls.js copied to clipboard

Set a bitrate/width range for levels and change quality between these ranges during playback

Open kiran-dcunha opened this issue 3 years ago • 1 comments

What do you want to do with Hls.js?

I want to provide video quality range to user, Good, Better and Best. Let's say we have 6 levels, two will be mapped to each quality.

Good - 360p, 480p Better - 576p, 720p Best - 1080p, 4k

When user clicks on better, hls player should only look at switching between 576p and 720p levels.

What have you tried so far?

I have tried hls.removeLevel(levelIndex, urlId), but there is no option to add levels back when the user switches quality.

hls.autoLevelCapping seems to have a max cap but no min cap.

hls.maxAutoLevel and hls.minAutoLevel seem to take effect only during initialisation.

kiran-dcunha avatar Apr 21 '22 04:04 kiran-dcunha

Not a Contribution

Hi @kiran-dcunha,

hls.minAutoLevel is read-only, but it reads from config.minAutoBitrate which you can set after instantiation.

robwalch avatar Jul 14 '22 20:07 robwalch