fix: [디자인QA] 슬라이드 인덱스 전환 시 영상이 처음부터 재생되도록 적용
This commit is contained in:
@@ -19,7 +19,6 @@ const props = defineProps<Props>()
|
||||
const { locale } = useI18n()
|
||||
const { sendLog, useAnalyticsLogDataDirect } = useAnalytics()
|
||||
|
||||
const slideThumbnailRef = ref<any>(null)
|
||||
const playingSlideIndex = ref<number | null>(null)
|
||||
let stopVideoTimeoutId: ReturnType<typeof setTimeout> | null = null
|
||||
|
||||
@@ -65,7 +64,7 @@ const handleVideoClick = (index: number) => {
|
||||
)
|
||||
}
|
||||
|
||||
const stopVideo = () => {
|
||||
const handleSplideMove = () => {
|
||||
// 이전 타이머 정리
|
||||
if (stopVideoTimeoutId) {
|
||||
clearTimeout(stopVideoTimeoutId)
|
||||
@@ -104,14 +103,13 @@ onBeforeUnmount(() => {
|
||||
class="title-md max-w-[944px]"
|
||||
/>
|
||||
<BlocksSlideThumbnail
|
||||
ref="slideThumbnailRef"
|
||||
:thumbnail-data="slideData"
|
||||
variant="media"
|
||||
class="mt-[24px] md:mt-[32px]"
|
||||
:pagination-data="paginationData"
|
||||
:arrows="slideData.length > 5"
|
||||
@move="stopVideo"
|
||||
@arrow-click="onArrowClick"
|
||||
@move="handleSplideMove"
|
||||
>
|
||||
<SplideSlide
|
||||
v-for="(item, index) in slideData"
|
||||
|
||||
Reference in New Issue
Block a user