Skip to content

Commit 74b0ad4

Browse files
committed
fix(UI): Fix disable PiP when using documentPictureInPicture (#5992)
Fixes #5991
1 parent 504ef9e commit 74b0ad4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

ui/controls.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
652652
isPiPAllowed() {
653653
if ('documentPictureInPicture' in window &&
654654
this.config_.preferDocumentPictureInPicture) {
655-
return true;
655+
const video = /** @type {HTMLVideoElement} */(this.localVideo_);
656+
return !video.disablePictureInPicture;
656657
}
657658
if (document.pictureInPictureEnabled) {
658659
const video = /** @type {HTMLVideoElement} */(this.localVideo_);

0 commit comments

Comments
 (0)