fix: revert pip change for iphone and add comment

This commit is contained in:
Sam Potts 2022-11-17 12:12:28 +11:00
parent e8beabd6a8
commit ea3675fcdc

View File

@ -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)) {