mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Next Button and seek button plugin
https://github.com/DanielnetoDotCom/YouPHPTube/issues/359
This commit is contained in:
parent
0ae73ee97d
commit
af4fa60ac1
12 changed files with 645 additions and 5 deletions
20
plugin/NextButton/script.js
Normal file
20
plugin/NextButton/script.js
Normal file
|
@ -0,0 +1,20 @@
|
|||
// Extend default
|
||||
if(typeof player == 'undefined'){player = videojs('mainVideo');}
|
||||
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('fa-step-forward');
|
||||
this.addClass('fa');
|
||||
this.controlText("Next");
|
||||
},
|
||||
handleClick: function () {
|
||||
document.location = autoPlayVideoURL;
|
||||
}
|
||||
});
|
||||
|
||||
// Register the new component
|
||||
videojs.registerComponent('nextButton', nextButton);
|
||||
player.getChild('controlBar').addChild('nextButton', {}, getPlayerButtonIndex('PlayToggle')+1);
|
Loading…
Add table
Add a link
Reference in a new issue