refactor: rename Subtitles prop videoUrl to subtitleUrl
This commit is contained in:
@@ -71,7 +71,7 @@ init()
|
|||||||
<GamePlayer @video-ready="onVideoReady" />
|
<GamePlayer @video-ready="onVideoReady" />
|
||||||
<Subtitles
|
<Subtitles
|
||||||
:current-time="store.videoTime"
|
:current-time="store.videoTime"
|
||||||
:video-url="store.currentScene?.subtitleUrl ?? null"
|
:subtitle-url="store.currentScene?.subtitleUrl ?? null"
|
||||||
/>
|
/>
|
||||||
<QTEOverlay
|
<QTEOverlay
|
||||||
:visible="store.qteActive"
|
:visible="store.qteActive"
|
||||||
|
|||||||
@@ -9,14 +9,14 @@ interface SubCue {
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
currentTime: number
|
currentTime: number
|
||||||
videoUrl: string | null
|
subtitleUrl: string | null
|
||||||
}>()
|
}>()
|
||||||
|
|
||||||
const cues = ref<SubCue[]>([])
|
const cues = ref<SubCue[]>([])
|
||||||
const currentText = ref('')
|
const currentText = ref('')
|
||||||
const loadedUrl = ref('')
|
const loadedUrl = ref('')
|
||||||
|
|
||||||
watch(() => props.videoUrl, async (url) => {
|
watch(() => props.subtitleUrl, async (url) => {
|
||||||
if (!url || url === loadedUrl.value) return
|
if (!url || url === loadedUrl.value) return
|
||||||
loadedUrl.value = url
|
loadedUrl.value = url
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user