1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 02:39:46 +02:00
Oinktube/plugin/NextButton/script.js
2018-05-01 17:43:43 -03:00

20 lines
No EOL
723 B
JavaScript

// Extend default
if(typeof player == 'undefined'){player = videojs(videoJsId);}
var Button = videojs.getComponent('Button');
var nextButton = videojs.extend(Button, {
//constructor: function(player, options) {
constructor: function () {
Button.apply(this, arguments);
//this.addClass('vjs-chapters-button');
this.addClass('next-button');
this.addClass('vjs-button-fa-size');
this.controlText("Next");
},
handleClick: function () {
document.location = autoPlayVideoURL;
}
});
// Register the new component
videojs.registerComponent('nextButton', nextButton);
player.getChild('controlBar').addChild('nextButton', {}, getPlayerButtonIndex('PlayToggle')+1);