mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
18 lines
562 B
JavaScript
18 lines
562 B
JavaScript
var Button = videojs.getComponent('Button');
|
|
|
|
class SocialButton extends Button {
|
|
constructor() {
|
|
super(...arguments);
|
|
this.addClass('social-button');
|
|
this.controlText("social");
|
|
setTimeout(function(){avideoTooltip(".social-button","Share");},1000);
|
|
}
|
|
|
|
handleClick() {
|
|
console.log('socialButton clicked');
|
|
tooglePlayersocial();
|
|
}
|
|
}
|
|
|
|
videojs.registerComponent('SocialButton', SocialButton);
|
|
player.getChild('controlBar').addChild('SocialButton', {}, getPlayerButtonIndex('fullscreenToggle') - 1);
|