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:
commit
bb44ba022d
23 changed files with 155 additions and 223 deletions
|
@ -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');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue