From 3c482cc9d8922049a32cc0d378ba68642fb76837 Mon Sep 17 00:00:00 2001 From: Supergamer1337 Date: Mon, 3 Aug 2020 13:11:23 +0200 Subject: [PATCH] Added overlay and play functionality. Co-authored-by: Esaias Tilly --- src/controllers/itemDetails/index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index df2855d69a..51a08b579c 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -1,5 +1,6 @@ import loading from 'loading'; import appRouter from 'appRouter'; +import itemShortcuts from 'itemShortcuts'; import layoutManager from 'layoutManager'; import connectionManager from 'connectionManager'; import * as userSettings from 'userSettings'; @@ -757,8 +758,8 @@ import 'emby-select'; overlayText: false, transition: false, disableIndicators: true, - disableHoverMenu: true, overlayPlayButton: true, + action: 'play', width: dom.getWindowSize().innerWidth * 0.25 }); @@ -1894,6 +1895,10 @@ import 'emby-select'; playCurrentItem(this, this.getAttribute('data-mode')); } + function onPosterClick(e) { + itemShortcuts.onClick.call(view.querySelector('.detailImageContainer'), e); + } + function onInstantMixClick() { playbackManager.instantMix(currentItem); } @@ -1980,6 +1985,7 @@ import 'emby-select'; bindAll(view, '.btnCancelSeriesTimer', 'click', onCancelSeriesTimerClick); bindAll(view, '.btnCancelTimer', 'click', onCancelTimerClick); bindAll(view, '.btnDownload', 'click', onDownloadClick); + view.querySelector('.detailImageContainer').addEventListener('click', onPosterClick); view.querySelector('.trackSelections').addEventListener('submit', onTrackSelectionsSubmit); view.querySelector('.btnSplitVersions').addEventListener('click', function () { splitVersions(self, view, apiClient, params);