1 import videojs from 'video.js'
3 const Button = videojs.getComponent('Button')
5 export interface NextVideoButtonOptions extends videojs.ComponentOptions {
9 class NextVideoButton extends Button {
10 private readonly nextVideoButtonOptions: NextVideoButtonOptions
12 constructor (player: videojs.Player, options?: NextVideoButtonOptions) {
13 super(player, options)
15 this.nextVideoButtonOptions = options
19 const button = videojs.dom.createEl('button', {
20 className: 'vjs-next-video'
21 }) as HTMLButtonElement
22 const nextIcon = videojs.dom.createEl('span', {
23 className: 'icon icon-next'
25 button.appendChild(nextIcon)
27 button.title = this.player_.localize('Next video')
33 this.nextVideoButtonOptions.handler()
37 videojs.registerComponent('NextVideoButton', NextVideoButton)