controls
Control bar plugin, it is registered by default.SourceCode
pluginName: controls
Note
This plugin is registered by default,If disabled it, all icons and progress
which created on it will not be registered at the same time!!
config
root
@type
:HTMLElement
default
:player.root
The plugin's parent dom,default is player.root
, The player's container dom
autoHide
@type
:Boolean
default
:true
Whether to support automatic hiding,,the default value is true
, If the value is false
, it will stay resident, E.g:
const playerConfig = {
controls: {
autoHide: true
}
...
}
mode
@type
:String
default
:normal
value
:normal/flex/bottom
The internal layout of the controlBar
,E.g:
const playerConfig = {
controls: {
mode: 'normal'
}
...
}
The display effects of different layout types are as follows:
normal
![](https://lf3-static.bytednsdoc.com/obj/eden-cn/nupenuvpxnuvo/xgplayer_doc/controls_nomarl.png)
flex
![](https://lf9-static.bytednsdoc.com/obj/eden-cn/nupenuvpxnuvo/xgplayer_doc/controls_flex.png)
bottom
![](https://lf3-static.bytednsdoc.com/obj/eden-cn/nupenuvpxnuvo/xgplayer_doc/controls_bottom.png)
initShow
@type
:Boolean
default
:false
是否在播放器初始化的时候就显示,默认为播放器起播之后才会显示控制栏
props
root
@type
:HTMlElement
The dom root node of the plugin