Skip to content

Commit

Permalink
fix(UI): Fix disable PiP when using documentPictureInPicture (#5992)
Browse files Browse the repository at this point in the history
Fixes #5991
  • Loading branch information
avelad committed Dec 5, 2023
1 parent 1af93e6 commit 6229284
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/controls.js
Expand Up @@ -652,7 +652,8 @@ shaka.ui.Controls = class extends shaka.util.FakeEventTarget {
isPiPAllowed() {
if ('documentPictureInPicture' in window &&
this.config_.preferDocumentPictureInPicture) {
return true;
const video = /** @type {HTMLVideoElement} */(this.localVideo_);
return !video.disablePictureInPicture;
}
if (document.pictureInPictureEnabled) {
const video = /** @type {HTMLVideoElement} */(this.localVideo_);
Expand Down

0 comments on commit 6229284

Please sign in to comment.