feat. video 컴포넌트 추가

This commit is contained in:
clkim
2025-10-22 09:22:10 +09:00
parent c9c39a06dd
commit dc369e8065
2 changed files with 17 additions and 2 deletions

View File

@@ -0,0 +1,16 @@
<script setup lang="ts">
interface Props {
src: string
type?: 'mp4' | 'webm'
}
const props = withDefaults(defineProps<Props>(), {
type: 'mp4',
})
</script>
<template>
<video v-if="props.src">
<source :src="props.src" :type="`video/${props.type}`" v-bind="$attrs" />
</video>
</template>

View File

@@ -87,8 +87,7 @@ const handleSplideMove = (_splide: SplideType, newIndex: number) => {
:resources-data="getComponentGroup(item, 'description')"
class="mt-2 text-left md:mt-5"
/>
<video
v-if="hasComponentGroup(item, 'video')"
<AtomsVideo
:src="currentVideoSrc(item)"
:autoplay="currentSlideIndex === index"
muted