西瓜播放器 HTML5 video video.js 播放器 HTML5播放器 mp4 hls hls.js flv flv.js dash dash.js 无缝切换

playnext

Control bar play next video button plugin。SourceCode

pluginName: playnext

config

position

  • @type: String
  • default: POSITIONS.ROOT_LEFTFor 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
})