mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Stacks the condition for Safari support and Chrome support all in to one
This puts the IF condition for detecting Chrome PiP support into the same line as the one that sets it up for Safari. I tested it in both browsers, as well as Firefox. In browsers where PiP is supported, they each respond to their own call and not the other (Safari only responds to the Webkit check, Chrome only responds to the document check). Firefox currently supports neither standard, so there's no issue there.
This commit is contained in:
parent
abaac9cc01
commit
c99f9c6d65
1 changed files with 2 additions and 4 deletions
|
@ -1443,12 +1443,10 @@ define(['browser', 'require', 'events', 'apphost', 'loading', 'dom', 'playbackMa
|
|||
var list = [];
|
||||
|
||||
var video = document.createElement('video');
|
||||
if (video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === "function") {
|
||||
list.push('PictureInPicture');
|
||||
}
|
||||
if (document.pictureInPictureEnabled) {
|
||||
if ((video.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === "function") || (document.pictureInPictureEnabled)) {
|
||||
list.push('PictureInPicture');
|
||||
}
|
||||
|
||||
else if (browser.ipad) {
|
||||
|
||||
// Unfortunately this creates a false positive on devices where its' not actually supported
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue