1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-04 10:19:24 +02:00
Oinktube/plugin/PlayerSkins/logo.js
2020-12-28 18:09:47 -03:00

23 lines
No EOL
822 B
JavaScript

$(document).ready(function () {
var Button = videojs.getComponent('Button');
var Logo = videojs.extend(Button, {
//constructor: function(player, options) {
constructor: function () {
Button.apply(this, arguments);
this.addClass('player-logo');
this.controlText(PlayerSkinLogoTitle);
},
handleClick: function () {
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);
}
});