videojs-hls-quality-selector icon indicating copy to clipboard operation
videojs-hls-quality-selector copied to clipboard

setCurrentQuality method needed

Open danday74 opened this issue 4 years ago • 6 comments

getCurrentQuality() allows us to get the current quality.

It would be good if we had a setCurrentQuality() method too.

This would allow us to programatically change the quality.

Many thanks for this wonderful plugin.

danday74 avatar Sep 03 '21 15:09 danday74

I agree this would be very useful

superbmario avatar Oct 28 '21 08:10 superbmario

any updates on this?

istng avatar May 02 '22 21:05 istng

actually setCurrentQuality method exists, not mentioned in the api docs though. Found it in the source code

Try this: player.hlsQualitySelector.setQuality(720);

nsavareika avatar May 04 '22 11:05 nsavareika

actually setCurrentQuality method exists, not mentioned in the api docs though. Found it in the source code

Try this: player.hlsQualitySelector.setQuality(720);

it does not work

ernestby avatar Jun 02 '22 19:06 ernestby

player.hlsQualitySelector.setQuality(720)

image

Night guys. Any solution here?

LucasNeevs avatar Aug 12 '22 02:08 LucasNeevs

Hi, I found solution thought js, check this solution: var player = videojs('videojs'); player.bigPlayButton.on('click', function(){ setTimeout(function(){ const qualityOptionsList = player.hlsQualitySelector._qualityButton.items; console.log(qualityOptionsList); const qualityOptionIndex = 4; //number of quality set qualityOptionsList[qualityOptionIndex].handleClick(); }, 1000); }); Whit this code change automatically of resolution

EDcasa avatar Nov 02 '22 17:11 EDcasa