diff --git a/dist/plex-meets-homeassistant.js b/dist/plex-meets-homeassistant.js index 0633b15..66a5a0f 100644 --- a/dist/plex-meets-homeassistant.js +++ b/dist/plex-meets-homeassistant.js @@ -19986,10 +19986,15 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.detailElem = document.createElement('div'); this.detailElem.className = 'detail'; this.detailElem.innerHTML = - "

"; + "

"; + this.detailElem.addEventListener('click', () => { + this.hideBackground(); + this.minimizeAll(); + }); this.content.appendChild(this.detailElem); const fullscreenTrailer = this.getElementsByClassName('detailPlayAction')[0]; - fullscreenTrailer.addEventListener('click', () => { + fullscreenTrailer.addEventListener('click', event => { + event.stopPropagation(); if (this.videoElem) { const videoPlayer = this.getElementsByClassName('videoPlayer')[0]; const video = videoPlayer.children[0]; diff --git a/src/plex-meets-homeassistant.ts b/src/plex-meets-homeassistant.ts index e4583cb..7750d4f 100644 --- a/src/plex-meets-homeassistant.ts +++ b/src/plex-meets-homeassistant.ts @@ -327,12 +327,18 @@ class PlexMeetsHomeAssistant extends HTMLElement { this.detailElem = document.createElement('div'); this.detailElem.className = 'detail'; this.detailElem.innerHTML = - "

"; + "

"; + + this.detailElem.addEventListener('click', () => { + this.hideBackground(); + this.minimizeAll(); + }); this.content.appendChild(this.detailElem); const fullscreenTrailer = this.getElementsByClassName('detailPlayAction')[0] as HTMLElement; - fullscreenTrailer.addEventListener('click', () => { + fullscreenTrailer.addEventListener('click', event => { + event.stopPropagation(); if (this.videoElem) { const videoPlayer = this.getElementsByClassName('videoPlayer')[0] as HTMLElement; const video = videoPlayer.children[0] as any;