Skip to content

Commit

Permalink
Merge pull request #9 from heseya/feature/MPT-1916
Browse files Browse the repository at this point in the history
fix: fixed displaying of the videos in product page
  • Loading branch information
demtario committed Jul 9, 2024
1 parent 343ad52 commit b8ead39
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
6 changes: 4 additions & 2 deletions components/media/Video.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<Placeholder v-if="isError || !src" :placeholder-class-name="placeholderClassName">
<MediaPlaceholder v-if="isError || !src" :placeholder-class-name="placeholderClassName">
<slot name="placeholder"></slot>
</Placeholder>
</MediaPlaceholder>

<video
v-else
Expand All @@ -26,6 +26,7 @@ const props = withDefaults(
autoplay?: boolean
loop?: boolean
muted?: boolean
playsinline?: boolean
controls?: boolean
}>(),
{
Expand All @@ -34,6 +35,7 @@ const props = withDefaults(
autoplay: true,
loop: true,
muted: true,
playsinline: true,
controls: false,
},
)
Expand Down
2 changes: 2 additions & 0 deletions components/media/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ const props = withDefaults(
autoplay?: boolean
loop?: boolean
muted?: boolean
playsinline?: boolean
controls?: boolean
placeholderClassName?: string
}>(),
Expand All @@ -76,6 +77,7 @@ const props = withDefaults(
autoplay: true,
loop: true,
muted: true,
playsinline: true,
controls: false,
placeholderClassName: '',
},
Expand Down
2 changes: 2 additions & 0 deletions components/product/page/Cover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
:media="image"
width="100"
height="100"
:autoplay="false"
@click="setActive(image)"
/>
</div>
Expand Down Expand Up @@ -125,6 +126,7 @@ watch(
cursor: pointer;
aspect-ratio: 1/1;
object-position: center;
overflow: initial;
}
&--singular {
Expand Down
9 changes: 8 additions & 1 deletion components/product/page/Gallery.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@
</button>

<div class="product-gallery__main">
<Media class="product-gallery__item" :media="active" width="1400" height="1400" />
<Media
class="product-gallery__item"
:media="active"
width="1400"
height="1400"
:controls="true"
/>
</div>

<div class="product-gallery__list">
Expand All @@ -31,6 +37,7 @@
class="product-gallery__item"
:media="m"
width="164"
:autoplay="false"
height="164"
@click="setActive(m)"
/>
Expand Down

0 comments on commit b8ead39

Please sign in to comment.