1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Merge pull request #4774 from thornbill/owner-of-a-lonely-if

This commit is contained in:
Bill Thornton 2023-09-14 10:53:21 -04:00 committed by GitHub
commit bb44ba022d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 155 additions and 223 deletions

View file

@ -864,11 +864,9 @@ export class HtmlVideoPlayer {
if (Screenfull.isEnabled) {
Screenfull.exit();
} else {
} else if (document.webkitIsFullScreen && document.webkitCancelFullscreen) {
// iOS Safari
if (document.webkitIsFullScreen && document.webkitCancelFullscreen) {
document.webkitCancelFullscreen();
}
document.webkitCancelFullscreen();
}
}
@ -1106,15 +1104,14 @@ export class HtmlVideoPlayer {
tryRemoveElement(this.#videoSecondarySubtitlesElem);
this.#videoSecondarySubtitlesElem = null;
}
} else { // destroy all
if (this.#videoSubtitlesElem) {
const subtitlesContainer = this.#videoSubtitlesElem.parentNode;
if (subtitlesContainer) {
tryRemoveElement(subtitlesContainer);
}
this.#videoSubtitlesElem = null;
this.#videoSecondarySubtitlesElem = null;
} else if (this.#videoSubtitlesElem) {
// destroy all
const subtitlesContainer = this.#videoSubtitlesElem.parentNode;
if (subtitlesContainer) {
tryRemoveElement(subtitlesContainer);
}
this.#videoSubtitlesElem = null;
this.#videoSecondarySubtitlesElem = null;
}
}
@ -1818,10 +1815,8 @@ export class HtmlVideoPlayer {
} else {
Windows.UI.ViewManagement.ApplicationView.getForCurrentView().tryEnterViewModeAsync(Windows.UI.ViewManagement.ApplicationViewMode.default);
}
} else {
if (video?.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === 'function') {
video.webkitSetPresentationMode(isEnabled ? 'picture-in-picture' : 'inline');
}
} else if (video?.webkitSupportsPresentationMode && typeof video.webkitSetPresentationMode === 'function') {
video.webkitSetPresentationMode(isEnabled ? 'picture-in-picture' : 'inline');
}
}