DEV Community

Mohit Aggarwal
Mohit Aggarwal

Posted on

Videojs Player Issue (Help)

Hey, i have converted a video into HLS format with the resolution of 1080p, 720p and 360p. how can i automatically make these resolution available in my web player.i am using videojs library for the player. All the resolutions are coming from the server.

Top comments (2)

Collapse
 
fjones profile image
FJones • Edited

VideoJS does not come with a quality selector by default - HLS will generally choose the matching format based on the bitrate fed to the client by the server.

There's a couple of videojs plugins that supply an active quality selector. One example would be videojs-hls-quality-selector (which I've forked recently to solve a few issues I had with it: github.com/FEichinger/videojs-hls-... ).

This, of course, presupposes that you have your HLS web server set up to supply an appropriate playlist file. For our projects (which are live streams, so may not necessarily match your requirements), we use nginx-rtmp-module, which supports the hls_variant instruction for explicit variants (an example usage here: stackoverflow.com/questions/387651... )

My apologies for any lack of etiquette.

Collapse
 
sahilkashyap64 profile image
Sahil kashyap