From 920fe906504e21a7ea7c7bc2a4cf80bd67992e04 Mon Sep 17 00:00:00 2001 From: LucasWerey Date: Thu, 18 Jan 2024 13:58:41 +0100 Subject: [PATCH 1/3] fix(dslib): update size of medium video player --- .../Media/VideoPlayer/VideoPlayer.vue | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/components/Media/VideoPlayer/VideoPlayer.vue b/src/components/Media/VideoPlayer/VideoPlayer.vue index b103b7d..a472c8a 100644 --- a/src/components/Media/VideoPlayer/VideoPlayer.vue +++ b/src/components/Media/VideoPlayer/VideoPlayer.vue @@ -13,7 +13,7 @@ :loop="autoplay" :autoplay="autoplay" :muted="autoplay" - class="flex items-center justify-center video-element object-cover" + class="video-element flex items-center justify-center object-cover" @pause="showPlayButton" @timeupdate.stop="updateProgress" :class="videoSizeClass" @@ -24,7 +24,7 @@
@@ -35,7 +35,7 @@
@@ -47,16 +47,16 @@ data-test="controls" v-if="showControls && !autoplay" id="controls" - class="w-full absolute top-full transform -translate-y-[100%] gap-10 px-4 flex flex-row-reverse justify-between" + class="absolute top-full flex w-full -translate-y-[100%] transform flex-row-reverse justify-between gap-10 px-4" >
-
-
+
+
@@ -76,7 +76,7 @@ data-test="volumeSlider" type="range" class="volume-slider cursor-pointer" - :class="size === 'xs' ? 'w-20 origin-bottom-center' : ''" + :class="size === 'xs' ? 'origin-bottom-center w-20' : ''" min="0" max="1" step="0.1" @@ -86,7 +86,7 @@ />
-
+
props.autoplay) const setSizeClasses = { xs: 'w-[310px] h-[196.93px]', sm: 'w-[620px] h-[393.85px]', - md: 'w-[732px] h-[465px]' + md: 'w-[936px] h-[594.59px]' } const setButtonSizeClasses = { @@ -193,11 +193,11 @@ const playVideo = () => { if (playPromise !== undefined) { playPromise // eslint-disable-next-line @typescript-eslint/no-unused-vars - .then((_) => { + .then(_ => { isPlaying.value = true togglePauseButton() }) - .catch((error) => { + .catch(error => { console.error('Play interrupted:', error) }) } From 4e73847777eaeffdd8040e5b62d0adb60ae84c53 Mon Sep 17 00:00:00 2001 From: LucasWerey Date: Thu, 18 Jan 2024 13:59:27 +0100 Subject: [PATCH 2/3] fix(dslib): update size of medium video player --- src/components/Media/VideoPlayer/VideoPlayer.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Media/VideoPlayer/VideoPlayer.spec.ts b/src/components/Media/VideoPlayer/VideoPlayer.spec.ts index f6f1651..93fec56 100644 --- a/src/components/Media/VideoPlayer/VideoPlayer.spec.ts +++ b/src/components/Media/VideoPlayer/VideoPlayer.spec.ts @@ -27,7 +27,7 @@ describe('VideoPlayer.vue', () => { const videoElement = wrapper.find('video') expect(videoElement.attributes('class')).toContain( - 'flex items-center justify-center video-element object-cover w-[620px] h-[393.85px]' + 'flex items-center justify-center video-element object-cover w-[936px] h-[594.59px]' ) }) From 4c50a32d6cb3600cf3ae2aa595d278c325a906f4 Mon Sep 17 00:00:00 2001 From: LucasWerey Date: Thu, 18 Jan 2024 14:02:12 +0100 Subject: [PATCH 3/3] fix(dslib): update size of medium video player --- src/components/Media/VideoPlayer/VideoPlayer.spec.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/Media/VideoPlayer/VideoPlayer.spec.ts b/src/components/Media/VideoPlayer/VideoPlayer.spec.ts index 93fec56..9d198df 100644 --- a/src/components/Media/VideoPlayer/VideoPlayer.spec.ts +++ b/src/components/Media/VideoPlayer/VideoPlayer.spec.ts @@ -17,7 +17,7 @@ describe('VideoPlayer.vue', () => { it('checks video size', async () => { const wrapper = mount(VideoPlayer, { props: { - size: 'sm', + size: 'md', src: 'https://example.com/video.mp4', autoplay: true } @@ -27,7 +27,7 @@ describe('VideoPlayer.vue', () => { const videoElement = wrapper.find('video') expect(videoElement.attributes('class')).toContain( - 'flex items-center justify-center video-element object-cover w-[936px] h-[594.59px]' + ' w-[936px] h-[594.59px]' ) })