mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
23 lines
730 B
JavaScript
23 lines
730 B
JavaScript
$(document).ready(function () {
|
|
|
|
var Button = videojs.getComponent('Button');
|
|
|
|
class Logo extends Button {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.addClass('player-logo');
|
|
this.controlText(PlayerSkinLogoTitle);
|
|
}
|
|
|
|
handleClick() {
|
|
window.open(webSiteRootURL, '_blank');
|
|
}
|
|
}
|
|
|
|
videojs.registerComponent('Logo', Logo);
|
|
if (player.getChild('controlBar').getChild('PictureInPictureToggle')) {
|
|
player.getChild('controlBar').addChild('Logo', {}, getPlayerButtonIndex('PictureInPictureToggle') + 1);
|
|
} else {
|
|
player.getChild('controlBar').addChild('Logo', {}, getPlayerButtonIndex('fullscreenToggle') - 1);
|
|
}
|
|
});
|