1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +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:
ronaldod 2020-05-20 10:32:10 +02:00 committed by GitHub
parent b5cf8aaf3f
commit 4f9ef4f5b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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);
});