From ea3675fcdca2f00239bf194fd96052702b01bab7 Mon Sep 17 00:00:00 2001 From: Sam Potts Date: Thu, 17 Nov 2022 12:12:28 +1100 Subject: [PATCH] fix: revert pip change for iphone and add comment --- src/js/support.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/js/support.js b/src/js/support.js index d4e226df..9b0306dd 100644 --- a/src/js/support.js +++ b/src/js/support.js @@ -38,6 +38,13 @@ const support = { // Picture-in-picture support // Safari & Chrome only currently pip: (() => { + // While iPhone's support picture-in-picture for some apps, seemingly Safari isn't one of them + // It will throw the following error when trying to enter picture-in-picture + // `NotSupportedError: The Picture-in-Picture mode is not supported.` + if (browser.isIPhone) { + return false; + } + // Safari // https://developer.apple.com/documentation/webkitjs/adding_picture_in_picture_to_your_safari_media_controls if (is.function(createElement('video').webkitSetPresentationMode)) {