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

28 lines
810 B
JavaScript

$(document).ready(function () {
var Button = videojs.getComponent('Button');
class Theater extends Button {
constructor() {
super(...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() {
toogleEC();
}
}
// Register the new component and set the right location as FF is not having a PIP button.
videojs.registerComponent('Theater', Theater);
});