How to make a separate HD or HQ button to switch quality

You can make a separate button instead of a drop-down list to switch to the best quality and back. For example:

You need to create a custom element for the control panel (text or SVG icon).

The opacity for the button must be set to 0.5. When switching to better quality, the button will automatically light up brighter.

In the file parameter in this case you need to provide two links to video or audio.


Provide in the action fieldĀ api:hd,lq/hq

Automatic saving of the selected quality Settings / Memorization / Memorization of the selected quality will have to be disabled (with such a button it will not work). But you can specify the required quality in the code from the outside using the default_quality parameter.


Or you can use theĀ JS API, if you set an identifier in a button in the constructor (for example, quality). Such a command will switch the button:


2018 - 2021 © PlayerJS


Restore password
Sign up
Log in

Sign up free

Sign up
By signing up, you agree to Terms of Service
Login if you have an account


Your name
Order player

Restore password

Forgot email? Contact us