videojs / videojs-contrib-quality-levels

Other
154 stars 52 forks source link

Auto Quality Change Example #103

Closed Miserlou closed 2 years ago

Miserlou commented 5 years ago

Hi all!

I've created an multi-bitrate HLS master stream. I've been able to use videojs-contrib-quality-levels to create a "switcher" in the UI to select the stream quality (thanks to this kind user, who actually provided a working example where the documentation doesn't) - but it doesn't seem to contain the functionality to automatically adapt based on available bandwidth - which is the whole point of HLS/DASH.

Is this functionality provided anywhere in the video.js stack, and if so can you point me to an example, or am I expected to roll my own bandwidth adaption?

Thanks!

gkatsev commented 5 years ago

Auto quality change is the default behavior of videojs-http-streaming (VHS). When you select particular renditions, it limits which of them can be used by VHS; for example, if you select 720p and there are several 720p renditions, it'll switch only between those 720p renditions. Once you select auto, it'll remove any restrictions and allow VHS to switch between all renditions again.