playnext
Control bar play next video button plugin。SourceCode
pluginName: playnext
config
position
@type
:String
default
:POSITIONS.ROOT_LEFT
For specific enumeration values, please see plugin-positions
index
@type
:Number
default
:1
urlList
@type
:Array
default
:[]
List of preset playback sources, after the current video playback ends, take the playback sources in the list and play them in sequence
events
Events.PLAYNEXT
- value:
playnext
- Trigger timing: Triggered when the button is clicked to play the next video source
demo
import Player, { Events } from 'xgplayer'
import 'xgplayer/dist/index.min.css'
const player = new Player({
...,
playnext: {
urlList: ['./a.mp4']
}
})
player.on(Events.PLAYNEXT, () => {
// TODO
})