mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 10:58:20 -07:00
Merge branch 'jellyfin:master' into feature-comicposition
This commit is contained in:
commit
195d05d883
@ -44,13 +44,7 @@ class AppRouter {
|
|||||||
}, 0);
|
}, 0);
|
||||||
});
|
});
|
||||||
|
|
||||||
document.addEventListener('viewshow', () => {
|
document.addEventListener('viewshow', () => this.onViewShow());
|
||||||
const resolve = this.resolveOnNextShow;
|
|
||||||
if (resolve) {
|
|
||||||
this.resolveOnNextShow = null;
|
|
||||||
resolve();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this.baseRoute = window.location.href.split('?')[0].replace(this.getRequestFile(), '');
|
this.baseRoute = window.location.href.split('?')[0].replace(this.getRequestFile(), '');
|
||||||
// support hashbang
|
// support hashbang
|
||||||
@ -417,6 +411,14 @@ class AppRouter {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
onViewShow() {
|
||||||
|
const resolve = this.resolveOnNextShow;
|
||||||
|
if (resolve) {
|
||||||
|
this.resolveOnNextShow = null;
|
||||||
|
resolve();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
onForcedLogoutMessageTimeout() {
|
onForcedLogoutMessageTimeout() {
|
||||||
const msg = this.forcedLogoutMsg;
|
const msg = this.forcedLogoutMsg;
|
||||||
this.forcedLogoutMsg = null;
|
this.forcedLogoutMsg = null;
|
||||||
@ -638,7 +640,11 @@ class AppRouter {
|
|||||||
|
|
||||||
const ignore = route.dummyRoute === true || this.previousRoute.dummyRoute === true;
|
const ignore = route.dummyRoute === true || this.previousRoute.dummyRoute === true;
|
||||||
this.previousRoute = route;
|
this.previousRoute = route;
|
||||||
if (ignore) return;
|
if (ignore) {
|
||||||
|
// Resolve 'show' promise
|
||||||
|
this.onViewShow();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.handleRoute(ctx, next, route);
|
this.handleRoute(ctx, next, route);
|
||||||
};
|
};
|
||||||
|
@ -675,13 +675,13 @@ function tryRemoveElement(elem) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
onEndedInternal(this, elem, this.onError);
|
onEndedInternal(this, elem, this.onError);
|
||||||
|
}
|
||||||
|
|
||||||
|
this.destroyCustomTrack(elem);
|
||||||
|
|
||||||
if (destroyPlayer) {
|
if (destroyPlayer) {
|
||||||
this.destroy();
|
this.destroy();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
this.destroyCustomTrack(elem);
|
|
||||||
|
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
@ -1062,7 +1062,13 @@ function tryRemoveElement(elem) {
|
|||||||
workerUrl: `${appRouter.baseUrl()}/libraries/subtitles-octopus-worker.js`,
|
workerUrl: `${appRouter.baseUrl()}/libraries/subtitles-octopus-worker.js`,
|
||||||
legacyWorkerUrl: `${appRouter.baseUrl()}/libraries/subtitles-octopus-worker-legacy.js`,
|
legacyWorkerUrl: `${appRouter.baseUrl()}/libraries/subtitles-octopus-worker-legacy.js`,
|
||||||
onError() {
|
onError() {
|
||||||
|
// HACK: Clear JavascriptSubtitlesOctopus: it gets disposed when an error occurs
|
||||||
|
htmlVideoPlayer.#currentSubtitlesOctopus = null;
|
||||||
|
|
||||||
|
// HACK: Give JavascriptSubtitlesOctopus time to dispose itself
|
||||||
|
setTimeout(() => {
|
||||||
onErrorInternal(htmlVideoPlayer, 'mediadecodeerror');
|
onErrorInternal(htmlVideoPlayer, 'mediadecodeerror');
|
||||||
|
}, 0);
|
||||||
},
|
},
|
||||||
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
|
timeOffset: (this._currentPlayOptions.transcodingOffsetTicks || 0) / 10000000,
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user