Skip to content

Commit 521bbe2

Browse files
committed
fix(UI): Fix disable PiP when using documentPictureInPicture (#5992)
Fixes #5991
1 parent dea6c88 commit 521bbe2

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
@@ -650,7 +650,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
650650
isPiPAllowed() {
651651
if ('documentPictureInPicture' in window &&
652652
this.config_.preferDocumentPictureInPicture) {
653-
return true;
653+
const video = /** @type {HTMLVideoElement} */(this.localVideo_);
654+
return !video.disablePictureInPicture;
654655
}
655656
if (document.pictureInPictureEnabled) {
656657
const video = /** @type {HTMLVideoElement} */(this.localVideo_);

0 commit comments

Comments
 (0)