Fix iOS PiP support detection
This commit is contained in:
parent
c5d4f7463b
commit
b001bc9a16
1 changed files with 6 additions and 1 deletions
|
@ -1390,7 +1390,12 @@ function tryRemoveElement(elem) {
|
|||
const list = [];
|
||||
|
||||
const video = document.createElement('video');
|
||||
if (video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === 'function' || document.pictureInPictureEnabled) {
|
||||
if (
|
||||
// Check non-standard Safari PiP support
|
||||
typeof video.webkitSupportsPresentationMode === 'function' && video.webkitSupportsPresentationMode('picture-in-picture') && typeof video.webkitSetPresentationMode === 'function'
|
||||
// Check standard PiP support
|
||||
|| document.pictureInPictureEnabled
|
||||
) {
|
||||
list.push('PictureInPicture');
|
||||
} else if (window.Windows) {
|
||||
if (Windows.UI.ViewManagement.ApplicationView.getForCurrentView().isViewModeSupported(Windows.UI.ViewManagement.ApplicationViewMode.compactOverlay)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue