1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Oinktube/plugin/TheaterButton/addButton.js
2022-03-17 11:43:59 -03:00

29 lines
897 B
JavaScript

$(document).ready(function () {
var Button = videojs.getComponent('Button');
var Theater = videojs.extend(Button, {
//constructor: function(player, options) {
constructor: function () {
Button.apply(this, arguments);
if(isCompressed){
this.addClass('ypt-expand');
this.controlText("Switch to Compressed Mode");
}else{
this.addClass('ypt-compress');
this.controlText("Switch to Theater Mode");
}
this.addClass('vjs-button-fa-size');
this.addClass('hidden-sm');
this.addClass('hidden-xs');
$(this).attr('id', 'avideoTheaterButton');
},
handleClick: function () {
toogleEC();
}
});
// Register the new component and set the right location as FF is not having a PIP button.
videojs.registerComponent('Theater', Theater);
});