feat(video): add timestamp support to comments

This commit is contained in:
yiling
2026-05-27 11:17:56 +08:00
parent ad8f3931f7
commit c048ceef28
12 changed files with 158 additions and 20 deletions
+10 -1
View File
@@ -16,10 +16,18 @@ type FileViewerProps = {
videoRef?: RefObject<Player | null>
onPlay?: () => void
onPause?: () => void
onTimeUpdate?: (time: number) => void
annotations?: Annotation[]
}
export function FileViewer({ file, videoRef, onPlay, onPause, annotations }: FileViewerProps) {
export function FileViewer({
file,
videoRef,
onPlay,
onPause,
onTimeUpdate,
annotations,
}: FileViewerProps) {
const { width: screenWidth } = useScreenSize()
const isImage = file.mediaType?.startsWith('image/')
const isVideo = file.mediaType?.startsWith('video/')
@@ -186,6 +194,7 @@ export function FileViewer({ file, videoRef, onPlay, onPause, annotations }: Fil
playerRef={videoRef}
onPlay={onPlay}
onPause={onPause}
onTimeUpdate={onTimeUpdate}
annotations={displayAnnotations}
/>
)}