1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Oinktube/plugin/NextButton/script.js
2023-06-30 11:41:25 -03:00

26 lines
846 B
JavaScript

// Extend default
$(document).ready(function () {
setTimeout(function() {
if(typeof player == 'undefined') {
player = videojs(videoJsId);
}
var Button = videojs.getComponent('Button');
class NextButton extends Button {
constructor() {
super(...arguments);
this.addClass('next-button');
this.addClass('vjs-button-fa-size');
this.controlText("Next");
}
handleClick() {
document.location = autoPlayVideoURL;
}
}
// Register the new component
videojs.registerComponent('NextButton', NextButton);
player.getChild('controlBar').addChild('NextButton', {}, getPlayerButtonIndex('PlayToggle')+1);
}, 30);
});