Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
53 lines
1.3 KiB
Vue
53 lines
1.3 KiB
Vue
<script setup lang="ts">
|
|
import { ref } from 'vue'
|
|
import { useRouter } from 'vue-router'
|
|
import { ImgButton } from '@/components/Button'
|
|
import { Video } from '@/components'
|
|
import { getPublicPath, IMAGE_PATHS, getVideoPoster } from '@/utils'
|
|
import { useFilmStore } from '@/stores'
|
|
|
|
const router = useRouter()
|
|
const film = useFilmStore()
|
|
|
|
const handleBack = () => {
|
|
router.back()
|
|
}
|
|
|
|
// 切块视频 URL(暂时用其他视频代替)
|
|
const cutVideoUrl = getPublicPath('video/film/editing/dygmk_kq_batch.mp4')
|
|
|
|
// 视频播放状态
|
|
const videoPlaying = ref(false)
|
|
|
|
const handleVideoEnded = () => {
|
|
film.markEditingVideoWatched('cut')
|
|
}
|
|
</script>
|
|
|
|
<template>
|
|
<div class="relative w-full h-full overflow-hidden">
|
|
<!-- 视频播放区域 -->
|
|
<Video
|
|
class="w-full h-full"
|
|
:src="cutVideoUrl"
|
|
:poster="getVideoPoster(cutVideoUrl)"
|
|
v-model="videoPlaying"
|
|
:muted="false"
|
|
:volume="1"
|
|
:controls="true"
|
|
:hideNativeControls="true"
|
|
:autoplay="true"
|
|
:seekable="film.editingVideosWatched['cut'] === true"
|
|
:show-center-play-icon="true"
|
|
@ended="handleVideoEnded"
|
|
/>
|
|
|
|
<!-- 返回按钮 -->
|
|
<ImgButton
|
|
class="absolute right-0 top-0 z-20"
|
|
:image="IMAGE_PATHS.COMPONENTS.BACK"
|
|
@click="handleBack"
|
|
/>
|
|
</div>
|
|
</template>
|