1 import { VideoJSComponentInterface, videojsUntyped } from '../peertube-videojs-typings'
2 // FIXME: something weird with our path definition in tsconfig and typings
4 import { Player } from 'video.js'
6 const Button: VideoJSComponentInterface = videojsUntyped.getComponent('Button')
8 class NextVideoButton extends Button {
10 constructor (player: Player, options: any) {
11 super(player, options)
15 const button = videojsUntyped.dom.createEl('button', {
16 className: 'vjs-next-video'
18 const nextIcon = videojsUntyped.dom.createEl('span', {
19 className: 'icon icon-next'
21 button.appendChild(nextIcon)
23 button.title = this.player_.localize('Next video')
29 this.options_.handler()
34 NextVideoButton.prototype.controlText_ = 'Next video'
36 NextVideoButton.registerComponent('NextVideoButton', NextVideoButton)