rotate
Player rotation plugin。SourceCode
pluginName: rotate
该插件默认隐藏,如需开启如下配置playerConfig
const player = new Player({
...,
rotate: true // Show rotate button
})
// OR
const player = new Player({
...,
rotate: {
disable: false
} // Show rotate button
})
config
position
@type
:String
default
:POSITIONS.ROOT_RIGHT
For specific enumeration values, please see plugin-positions
index
@type
:Number
default
:6
disable
@type
:Boolean
default
:false
This configuration item can be set by playerConfig.rotate
setting boolean value,E.g:
const playerConfig = {
rotate: true
...
}
innerRotate
@type
:Boolean
default
:false
true means only the screen rotates false means the entire player rotates
clockwise
@type
:Boolean
default
:false
Whether to rotate in a clockwise direction
rotateDeg
@type
:Number
0-1default
:0
Initial rotation degree, default value 0
events
Events.ROTATE
- value:
rotate
- Trigger Timing: Rotate the screen successfully
const player = new Player({
...
})
player.on(Events.ROTATE, (rotateDeg) => {
console.log('Degree of rotation is rotateDeg')
})