playnext
Control bar play next video button plugin。SourceCode
pluginName: playnext
config
position
@type:Stringdefault:POSITIONS.ROOT_LEFTFor specific enumeration values, please see plugin-positions
index
@type:Numberdefault:1
urlList
@type:Arraydefault:[]
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
})