西瓜播放器 HTML5 video video.js 播放器 HTML5播放器 mp4 hls hls.js flv flv.js dash dash.js 无缝切换

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

flex

bottom

initShow

  • @type: Boolean
  • default: false

是否在播放器初始化的时候就显示,默认为播放器起播之后才会显示控制栏

props

root

  • @type: HTMlElement

The dom root node of the plugin