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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user