refactor: rename Subtitles prop videoUrl to subtitleUrl

This commit is contained in:
2026-06-07 20:48:39 +08:00
parent b3bbe7b39d
commit e2670c50d4
2 changed files with 3 additions and 3 deletions

View File

@@ -71,7 +71,7 @@ init()
<GamePlayer @video-ready="onVideoReady" />
<Subtitles
:current-time="store.videoTime"
:video-url="store.currentScene?.subtitleUrl ?? null"
:subtitle-url="store.currentScene?.subtitleUrl ?? null"
/>
<QTEOverlay
:visible="store.qteActive"

View File

@@ -9,14 +9,14 @@ interface SubCue {
const props = defineProps<{
currentTime: number
videoUrl: string | null
subtitleUrl: string | null
}>()
const cues = ref<SubCue[]>([])
const currentText = ref('')
const loadedUrl = ref('')
watch(() => props.videoUrl, async (url) => {
watch(() => props.subtitleUrl, async (url) => {
if (!url || url === loadedUrl.value) return
loadedUrl.value = url
try {