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

cssFullScreen

Web page full-screen plugin,it is registered by default in DefaultPreset on PC。源码

pluginName: cssfullscreen

config

position

  • @type: String
  • default: POSITIONS.ROOT_RIGHT,For specific enumeration values, please see plugin-positions

The plug-in Dom mount location

index

  • @type: Number
  • default: 1

disable

  • @type: Boolean
  • default: false

Whether to disable

target

  • @type: HTMLElement
  • default: null

documentElement for full-screen webpage, the default value is player.root; This configuration item value must be the ancestor node of player.root

demo

const player = new Player({
  el: el,
  ...,
  cssfullScreen: {
    target: el.parentElement // it can also be other ancestor nodes of el
  }
})

/**
 *  you can disable this plugin like below demo
 */
const player = new Player({
  ...,
  ignores: ['cssfullscreen']
})