From ff5222b92c453478e7a4c4701e21f80f43f94ea7 Mon Sep 17 00:00:00 2001 From: Tzipi-kaltura Date: Sun, 9 Jun 2024 15:55:39 +0300 Subject: [PATCH 1/2] fix(SUP-43040): v7 player issues when using picture-in-picture (pop-out) --- src/engines/html5/html5.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engines/html5/html5.ts b/src/engines/html5/html5.ts index 37c26d60..ca81af9b 100644 --- a/src/engines/html5/html5.ts +++ b/src/engines/html5/html5.ts @@ -559,7 +559,7 @@ export default class Html5 extends FakeEventTarget implements IEngine { // Currently it's supported in chrome and in safari. So if we consider checking support before, // we can use this flag to distinguish between the two. In the future we might need a different method. // Second condition is because flow does not support this API yet - if (document.pictureInPictureEnabled && typeof this._el.requestPictureInPicture === 'function') { + if (document.pictureInPictureEnabled && !this._el.disablePictureInPicture && typeof this._el.requestPictureInPicture === 'function') { this._el.requestPictureInPicture().catch(error => { this.dispatchEvent( new FakeEvent( From a456dfcf5091e8ba987bbdc29f271b9eff142381 Mon Sep 17 00:00:00 2001 From: Tzipi <101048005+Tzipi-kaltura@users.noreply.github.com> Date: Sun, 9 Jun 2024 16:15:43 +0300 Subject: [PATCH 2/2] change order --- src/engines/html5/html5.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engines/html5/html5.ts b/src/engines/html5/html5.ts index ca81af9b..58a8e71c 100644 --- a/src/engines/html5/html5.ts +++ b/src/engines/html5/html5.ts @@ -559,7 +559,7 @@ export default class Html5 extends FakeEventTarget implements IEngine { // Currently it's supported in chrome and in safari. So if we consider checking support before, // we can use this flag to distinguish between the two. In the future we might need a different method. // Second condition is because flow does not support this API yet - if (document.pictureInPictureEnabled && !this._el.disablePictureInPicture && typeof this._el.requestPictureInPicture === 'function') { + if (document.pictureInPictureEnabled && typeof this._el.requestPictureInPicture === 'function' && !this._el.disablePictureInPicture) { this._el.requestPictureInPicture().catch(error => { this.dispatchEvent( new FakeEvent(