From 9b894f3b113bca648133ba5c27154e1c7eb2fb38 Mon Sep 17 00:00:00 2001 From: Andy Blum Date: Wed, 11 Dec 2024 09:49:58 -0500 Subject: [PATCH] yarn format --- .../background-media/background-media.ts | 23 ++++++++----------- 1 file changed, 10 insertions(+), 13 deletions(-) diff --git a/packages/web-components/src/components/background-media/background-media.ts b/packages/web-components/src/components/background-media/background-media.ts index b39d40c896c..fceec5958dc 100644 --- a/packages/web-components/src/components/background-media/background-media.ts +++ b/packages/web-components/src/components/background-media/background-media.ts @@ -102,7 +102,9 @@ class C4DBackgroundMedia extends C4DImage { * Query selector to get the child video player container */ protected get videoPlayerContainer() { - return this.querySelector(`${c4dPrefix}-video-player-container`) as C4DVideoPlayerContainer | null; + return this.querySelector( + `${c4dPrefix}-video-player-container` + ) as C4DVideoPlayerContainer | null; } /** @@ -115,33 +117,28 @@ class C4DBackgroundMedia extends C4DImage { const assignedImages = assignedElements.filter( (el) => el.tagName === `${c4dPrefix}-image-item`.toUpperCase() ); - const assignedVideos = (assignedElements.filter( + const assignedVideos = assignedElements.filter( (el) => el.tagName === `${c4dPrefix}-video-player-container`.toUpperCase() - ) as C4DVideoPlayerContainer[]); + ) as C4DVideoPlayerContainer[]; - if ( - assignedImages.length && - !assignedVideos.length - ) { + if (assignedImages.length && !assignedVideos.length) { this.containsOnlyImages = true; } } toggleVideoState() { - const { - videoPlayerContainer: video, - } = this; + const { videoPlayerContainer: video } = this; if (video?.isPlaying) { - video.pauseAllVideos() + video.pauseAllVideos(); } else { - video?.playAllVideos() + video?.playAllVideos(); } } renderVideoControls() { const { toggleVideoState, videoPlayerContainer } = this; - const { isPlaying } = videoPlayerContainer ?? {} + const { isPlaying } = videoPlayerContainer ?? {}; return html`