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

Fix all loneliness

This commit is contained in:
Bill Thornton 2023-09-12 17:02:06 -04:00
parent aef99ce247
commit 20381bd3ec
22 changed files with 154 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;
}
}
@ -1812,10 +1809,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');
}
}