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] 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 () {