1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00

videojs update

This commit is contained in:
Daniel Neto 2023-06-30 11:41:25 -03:00
parent 7581f1e883
commit 87721585c1
10 changed files with 95 additions and 93 deletions

View file

@ -1,24 +1,26 @@
// Extend default
$(document).ready(function () {
setTimeout(function(){ if(typeof player == 'undefined'){player = videojs(videoJsId);}
setTimeout(function() {
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;
}
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);
});
// Register the new component
videojs.registerComponent('nextButton', nextButton);
player.getChild('controlBar').addChild('nextButton', {}, getPlayerButtonIndex('PlayToggle')+1);
}, 30); });