cssFullScreen
Web page full-screen plugin,it is registered by default in DefaultPreset on PC。源码
pluginName: cssfullscreen
config
position
@type:Stringdefault:POSITIONS.ROOT_RIGHT,For specific enumeration values, please see plugin-positions
The plug-in Dom mount location
index
@type:Numberdefault:1
disable
@type:Booleandefault:false
Whether to disable
target
@type:HTMLElementdefault:null
useScreenOrientation
@type:Booleandefault:false@desc: Whether to use ScreenOrientation lock after requestFullScreen ifScreenOrientation Lockavailable and video aspect ratio is greater than 1.
lockOrientationType
@type:OrientationTypedefault: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 withuseScreenOrientation.
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']
})