Merge pull request #307 from DrPandemic/redirect-video-error

Redirect when loading video player fails
This commit is contained in:
Anthony Lavado 2019-05-14 20:50:10 -04:00 committed by GitHub
commit 2a527e5e20
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1227,16 +1227,22 @@ define(["playbackManager", "dom", "inputmanager", "datetime", "itemHelper", "med
Emby.Page.setTransparency("full");
});
view.addEventListener("viewshow", function (e) {
events.on(playbackManager, "playerchange", onPlayerChange);
bindToPlayer(playbackManager.getCurrentPlayer());
dom.addEventListener(document, window.PointerEvent ? "pointermove" : "mousemove", onPointerMove, {
passive: true
});
showOsd();
inputManager.on(window, onInputCommand);
dom.addEventListener(window, "keydown", onWindowKeyDown, {
passive: true
});
try {
events.on(playbackManager, "playerchange", onPlayerChange);
bindToPlayer(playbackManager.getCurrentPlayer());
dom.addEventListener(document, window.PointerEvent ? "pointermove" : "mousemove", onPointerMove, {
passive: true
});
showOsd();
inputManager.on(window, onInputCommand);
dom.addEventListener(window, "keydown", onWindowKeyDown, {
passive: true
});
} catch(e) {
require(['appRouter'], function(appRouter) {
appRouter.showDirect('/');
});
}
});
view.addEventListener("viewbeforehide", function () {
if (statsOverlay) {