自定义质量开关按钮

  抱歉,此页面正在等待翻译成土耳其语

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.

[lq]//site.com/lq.mp4,[hq]//site.com/hq.mp4

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.

default_quality:"hq"

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:

player.api("hd","lq/hq","id:quality");

19.10.26
2024 © PlayerJS

登录

登录

免费注册

注册
注册即表示您同意服务条款
登录(如果您有帐户)

恢复密码

恢复
忘记电子邮件?联系我们