mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Rename and move declaration of playerPauseClickTimeout
This commit is contained in:
parent
6374802309
commit
41ea428237
1 changed files with 10 additions and 10 deletions
|
@ -1224,14 +1224,15 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let playPauseClickTimeout;
|
||||||
function onViewHideStopPlayback() {
|
function onViewHideStopPlayback() {
|
||||||
if (playbackManager.isPlayingVideo()) {
|
if (playbackManager.isPlayingVideo()) {
|
||||||
require(['shell'], function (shell) {
|
require(['shell'], function (shell) {
|
||||||
shell.disableFullscreen();
|
shell.disableFullscreen();
|
||||||
});
|
});
|
||||||
|
|
||||||
if (playerPauseClickTimeout) {
|
if (playPauseClickTimeout) {
|
||||||
clearTimeout(playerPauseClickTimeout);
|
clearTimeout(playPauseClickTimeout);
|
||||||
}
|
}
|
||||||
var player = currentPlayer;
|
var player = currentPlayer;
|
||||||
view.removeEventListener("viewbeforehide", onViewHideStopPlayback);
|
view.removeEventListener("viewbeforehide", onViewHideStopPlayback);
|
||||||
|
@ -1372,7 +1373,6 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||||
destroySubtitleSync();
|
destroySubtitleSync();
|
||||||
});
|
});
|
||||||
var lastPointerDown = 0;
|
var lastPointerDown = 0;
|
||||||
let playerPauseClickTimeout;
|
|
||||||
dom.addEventListener(view, window.PointerEvent ? "pointerdown" : "click", function (e) {
|
dom.addEventListener(view, window.PointerEvent ? "pointerdown" : "click", function (e) {
|
||||||
if (dom.parentWithClass(e.target, ["videoOsdBottom", "upNextContainer"])) {
|
if (dom.parentWithClass(e.target, ["videoOsdBottom", "upNextContainer"])) {
|
||||||
return void showOsd();
|
return void showOsd();
|
||||||
|
@ -1392,14 +1392,14 @@ define(["playbackManager", "dom", "inputManager", "datetime", "itemHelper", "med
|
||||||
|
|
||||||
case "mouse":
|
case "mouse":
|
||||||
if (!e.button) {
|
if (!e.button) {
|
||||||
if (playerPauseClickTimeout) {
|
if (playPauseClickTimeout) {
|
||||||
clearTimeout(playerPauseClickTimeout);
|
clearTimeout(playPauseClickTimeout);
|
||||||
playerPauseClickTimeout = 0;
|
playPauseClickTimeout = 0;
|
||||||
} else {
|
} else {
|
||||||
playerPauseClickTimeout = setTimeout(() => {
|
playPauseClickTimeout = setTimeout(() => {
|
||||||
playbackManager.playPause(currentPlayer);
|
playbackManager.playPause(currentPlayer);
|
||||||
showOsd();
|
showOsd();
|
||||||
playerPauseClickTimeout = 0;
|
playPauseClickTimeout = 0;
|
||||||
}, 300);
|
}, 300);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue