mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Location of button
As FF has not PIP button it can not be added behind it. So it will before fullscreen. Other browsers it will be after the pip button.
This commit is contained in:
parent
b5cf8aaf3f
commit
4f9ef4f5b3
1 changed files with 5 additions and 2 deletions
|
@ -22,8 +22,11 @@ $(document).ready(function () {
|
|||
}
|
||||
});
|
||||
|
||||
// Register the new component
|
||||
// Register the new component and set the right location as FF is not having a PIP button.
|
||||
videojs.registerComponent('Theater', Theater);
|
||||
player.getChild('controlBar').addChild('Theater', {}, getPlayerButtonIndex('CaptionsButton') + 1);
|
||||
if (player.getChild('controlBar').getChild('PictureInPictureToggle')){
|
||||
player.getChild('controlBar').addChild('Theater', {}, getPlayerButtonIndex('PictureInPictureToggle') + 1);
|
||||
} else {
|
||||
player.getChild('controlBar').addChild('Theater', {}, getPlayerButtonIndex('fullscreenToggle') - 1);
|
||||
}, 30);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue