blob: 7f7fd7ae1c739492b5c73a2e071065f882688db4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<script lang="ts">
import type { ProductMediaItem } from '@jet-app/app-store/api/models';
import Artwork from '~/components/Artwork.svelte';
import Video from '~/components/jet/Video.svelte';
export let item: ProductMediaItem;
</script>
{#if item.screenshot || item.video}
<article>
<div class="artwork-container">
{#if item.screenshot}
<Artwork artwork={item.screenshot} profile="screenshot-tv" />
{:else if item.video}
<Video autoplay video={item.video} profile="screenshot-tv" />
{/if}
</div>
</article>
{/if}
<style>
.artwork-container,
.artwork-container :global(video) {
border-radius: 1.3% / 1.9%;
overflow: hidden;
/* This `transform` is required to make the `overflow: hidden` clip properly on Chrome */
transform: translateZ(0);
}
.artwork-container :global(video):fullscreen {
border-radius: 0;
}
</style>
|