From 9c4517957a6174ea3c73cb5b4afc0369c8c143c9 Mon Sep 17 00:00:00 2001 From: Jean-Samuel Aubry-Guzzi Date: Thu, 25 Apr 2019 11:50:44 -0400 Subject: [PATCH 1/2] Add double click to fullscreen --- src/controllers/videoosd.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/videoosd.js b/src/controllers/videoosd.js index c9befe03c5..96613aec78 100644 --- a/src/controllers/videoosd.js +++ b/src/controllers/videoosd.js @@ -368,7 +368,7 @@ define(["playbackManager", "dom", "inputmanager", "datetime", "itemHelper", "med if ("osd" === currentVisibleMenu) { hideOsd(); } else if (!currentVisibleMenu) { - showOsd(); + showOsd(); } } @@ -1254,6 +1254,12 @@ define(["playbackManager", "dom", "inputmanager", "datetime", "itemHelper", "med if (browser.touch) { dom.addEventListener(view, "dblclick", onDoubleClick, {}); + } else { + dom.addEventListener(view, "dblclick", function () { + playbackManager.toggleFullscreen(currentPlayer); + }, { + passive: true + }); } view.querySelector(".buttonMute").addEventListener("click", function () { From bca2b35d495758bb3c94ccaf5a43fed5212ea684 Mon Sep 17 00:00:00 2001 From: Claus Vium Date: Fri, 26 Apr 2019 08:46:01 -0400 Subject: [PATCH 2/2] Update src/controllers/videoosd.js Co-Authored-By: DrPandemic --- src/controllers/videoosd.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/controllers/videoosd.js b/src/controllers/videoosd.js index 96613aec78..1825f6d6c7 100644 --- a/src/controllers/videoosd.js +++ b/src/controllers/videoosd.js @@ -1255,11 +1255,8 @@ define(["playbackManager", "dom", "inputmanager", "datetime", "itemHelper", "med if (browser.touch) { dom.addEventListener(view, "dblclick", onDoubleClick, {}); } else { - dom.addEventListener(view, "dblclick", function () { - playbackManager.toggleFullscreen(currentPlayer); - }, { - passive: true - }); + var options = { passive: true }; + dom.addEventListener(view, "dblclick", function () { playbackManager.toggleFullscreen(currentPlayer); }, options); } view.querySelector(".buttonMute").addEventListener("click", function () {