西瓜播放器 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

useScreenOrientation

  • @type: Boolean
  • default: false
  • @desc: Whether to use ScreenOrientation lock after requestFullScreen if ScreenOrientation Lock available and video aspect ratio is greater than 1.

lockOrientationType

  • @type: OrientationType
  • default: landscape
  • @desc: It only takes effect when the system is in fullscreen and does not take effect when the CSS is in full screen. This configuration needs to be used in conjunction with useScreenOrientation.

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']
})