1
0
mirror of https://github.com/videojs/video.js.git synced 2025-11-06 09:19:15 +02:00

fix(pip): hide PiP button in browsers not support the WICG spec (#6131)

This commit is contained in:
Gary Katsevman
2019-07-26 11:33:25 -04:00
committed by GitHub
parent 15ff8f7242
commit 3afa7d1ce4

View File

@@ -2,6 +2,7 @@
* @file control-bar.js
*/
import Component from '../component.js';
import document from 'global/document';
// Required children
import './play-toggle.js';
@@ -68,10 +69,17 @@ ControlBar.prototype.options_ = {
'descriptionsButton',
'subsCapsButton',
'audioTrackButton',
'pictureInPictureToggle',
'fullscreenToggle'
]
};
if ('exitPictureInPicture' in document) {
ControlBar.prototype.options_.children.splice(
ControlBar.prototype.options_.children.length - 1,
0,
'pictureInPictureToggle'
);
}
Component.registerComponent('ControlBar', ControlBar);
export default ControlBar;