Added overlay and play functionality.

Co-authored-by: Esaias Tilly <esaias@tillys.se>
This commit is contained in:
Supergamer1337 2020-08-03 13:11:23 +02:00
parent 7f72eca5fa
commit 3c482cc9d8

View File

@ -1,5 +1,6 @@
import loading from 'loading'; import loading from 'loading';
import appRouter from 'appRouter'; import appRouter from 'appRouter';
import itemShortcuts from 'itemShortcuts';
import layoutManager from 'layoutManager'; import layoutManager from 'layoutManager';
import connectionManager from 'connectionManager'; import connectionManager from 'connectionManager';
import * as userSettings from 'userSettings'; import * as userSettings from 'userSettings';
@ -757,8 +758,8 @@ import 'emby-select';
overlayText: false, overlayText: false,
transition: false, transition: false,
disableIndicators: true, disableIndicators: true,
disableHoverMenu: true,
overlayPlayButton: true, overlayPlayButton: true,
action: 'play',
width: dom.getWindowSize().innerWidth * 0.25 width: dom.getWindowSize().innerWidth * 0.25
}); });
@ -1894,6 +1895,10 @@ import 'emby-select';
playCurrentItem(this, this.getAttribute('data-mode')); playCurrentItem(this, this.getAttribute('data-mode'));
} }
function onPosterClick(e) {
itemShortcuts.onClick.call(view.querySelector('.detailImageContainer'), e);
}
function onInstantMixClick() { function onInstantMixClick() {
playbackManager.instantMix(currentItem); playbackManager.instantMix(currentItem);
} }
@ -1980,6 +1985,7 @@ import 'emby-select';
bindAll(view, '.btnCancelSeriesTimer', 'click', onCancelSeriesTimerClick); bindAll(view, '.btnCancelSeriesTimer', 'click', onCancelSeriesTimerClick);
bindAll(view, '.btnCancelTimer', 'click', onCancelTimerClick); bindAll(view, '.btnCancelTimer', 'click', onCancelTimerClick);
bindAll(view, '.btnDownload', 'click', onDownloadClick); bindAll(view, '.btnDownload', 'click', onDownloadClick);
view.querySelector('.detailImageContainer').addEventListener('click', onPosterClick);
view.querySelector('.trackSelections').addEventListener('submit', onTrackSelectionsSubmit); view.querySelector('.trackSelections').addEventListener('submit', onTrackSelectionsSubmit);
view.querySelector('.btnSplitVersions').addEventListener('click', function () { view.querySelector('.btnSplitVersions').addEventListener('click', function () {
splitVersions(self, view, apiClient, params); splitVersions(self, view, apiClient, params);