mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-26 04:07:58 +00:00
feat(db): add custom migration to backfill totalFrames and startTimecode
This commit is contained in:
@@ -509,7 +509,7 @@ const VideoPlayer: React.FC<VideoPlayerProps> = ({
|
||||
// Frame-accurate hook and derived state
|
||||
const metadata = data.media.metadata
|
||||
const frameRate = metadata.frameRate || 30
|
||||
const totalFrames = metadata.totalFrames || Math.round((metadata.duration || 0) * frameRate)
|
||||
const totalFrames = metadata.totalFrames || 0
|
||||
const { currentFrame, seekToFrame } = useFramePlayer(videoRef, frameRate, totalFrames)
|
||||
|
||||
const currentTime = currentFrame / frameRate
|
||||
|
||||
Reference in New Issue
Block a user