Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setCurrentQuality method needed #75

Open
danday74 opened this issue Sep 3, 2021 · 6 comments
Open

setCurrentQuality method needed #75

danday74 opened this issue Sep 3, 2021 · 6 comments

Comments

@danday74
Copy link

danday74 commented Sep 3, 2021

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.

@superbmario
Copy link

I agree this would be very useful

@istng
Copy link

istng commented May 2, 2022

any updates on this?

@nsavareika
Copy link

nsavareika commented May 4, 2022

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

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

@ernestby
Copy link

ernestby commented Jun 2, 2022

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

@LucasNeevs
Copy link

player.hlsQualitySelector.setQuality(720)

image

Night guys. Any solution here?

@EDcasa
Copy link

EDcasa commented Nov 2, 2022

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants