feat: enforce 100% frame-based positioning (no time)
Core Principle: Frame is the ONLY standard Changes: - VideoPlayer: Remove startTime/endTime props - VideoPlayer: Add mandatory startFrame/endFrame check - VideoPlayer: UI shows F123 (51.2s) format - All Views: Only set startFrame/endFrame - All Views: Only pass :start-frame/:end-frame - Remove all startTime/endTime from currentVideo refs Time is only used for display (auxiliary). Frame is the source of truth for all positioning.
This commit is contained in:
@@ -270,7 +270,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<VideoPlayer v-if="playing" :file-uuid="currentVideo.fileUuid" :start-time="currentVideo.startTime" :end-time="currentVideo.endTime" :all-traces="allTraces" :merged-segments="mergedSegments" :initial-trace-idx="currentVideo.traceIdx" :title="currentVideo.title" @close="playing = false" />
|
||||
<VideoPlayer v-if="playing" :file-uuid="currentVideo.fileUuid" :start-frame="currentVideo.startFrame" :end-frame="currentVideo.endFrame" :all-traces="allTraces" :merged-segments="mergedSegments" :initial-trace-idx="currentVideo.traceIdx" :title="currentVideo.title" @close="playing = false" />
|
||||
|
||||
<!-- Trace strip context menu -->
|
||||
<div v-if="traceCtxMenu.show" class="ms-ctx-menu" :style="{ left: traceCtxMenu.x + 'px', top: traceCtxMenu.y + 'px', display: 'block' }" @click.stop @mousedown.stop @pointerdown.stop>
|
||||
@@ -300,7 +300,7 @@ const allPeople = ref<any[]>([])
|
||||
const allTraces = ref<any[]>([])
|
||||
const mergedSegments = ref<any[]>([])
|
||||
const playing = ref(false)
|
||||
const currentVideo = ref({ fileUuid: '', startTime: 0, endTime: 0, traceIdx: 0, title: '' })
|
||||
const currentVideo = ref({ fileUuid: '', startFrame: 0, endFrame: 0, traceIdx: 0, title: '' })
|
||||
const showCandidates = ref(false)
|
||||
const showMerge = ref(false)
|
||||
const mergeSearchQuery = ref('')
|
||||
@@ -734,10 +734,10 @@ function playAllSegments() {
|
||||
const t = allTraces.value[0]
|
||||
currentVideo.value = {
|
||||
fileUuid: t.file_uuid || '',
|
||||
startTime: t.first_sec || t.start_time || 0,
|
||||
endTime: t.last_sec || t.end_time || 0,
|
||||
startFrame: t.first_frame || 0,
|
||||
endFrame: t.last_frame || (t.first_frame || 0) + 30,
|
||||
traceIdx: 0,
|
||||
title: `${person.value?.name} · ${card.count} segments`,
|
||||
title: `F${t.first_frame || 0}-F${t.last_frame || 0} (${person.value?.name})`,
|
||||
}
|
||||
playing.value = true
|
||||
}
|
||||
@@ -747,10 +747,10 @@ function playMerged(m: any) {
|
||||
if (!t) return
|
||||
currentVideo.value = {
|
||||
fileUuid: t.file_uuid || '',
|
||||
startTime: t.first_sec || t.start_time || 0,
|
||||
endTime: t.last_sec || t.end_time || 0,
|
||||
startFrame: t.first_frame || 0,
|
||||
endFrame: t.last_frame || (t.first_frame || 0) + 30,
|
||||
traceIdx: m._startIdx,
|
||||
title: `${person.value?.name} · #${m.start_frame}–#${m.end_frame}`,
|
||||
title: `F${t.first_frame || 0}-F${t.last_frame || 0} (${person.value?.name})`,
|
||||
}
|
||||
playing.value = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user