mirror of
https://github.com/shumaiOne/shumai.git
synced 2026-11-25 13:39:04 +00:00
fix(video): display totalFrames - 1 as duration to align timer at end
This commit is contained in:
@@ -116,10 +116,11 @@ const ControlBar: React.FC<ControlBarProps> = ({
|
||||
const { videoTimeDisplayMode, setVideoTimeDisplayMode } = useUiStore()
|
||||
|
||||
const startTimecode = data.media?.metadata?.startTimecode
|
||||
const displayTotalFrames = Math.max(0, totalFrames - 1)
|
||||
const displayString =
|
||||
videoTimeDisplayMode === 'frames'
|
||||
? `${currentFrame} / ${totalFrames} fr`
|
||||
: `${formatTimecode(currentFrame, frameRate, videoTimeDisplayMode, startTimecode)} / ${formatTimecode(totalFrames, frameRate, videoTimeDisplayMode, startTimecode)}`
|
||||
? `${currentFrame} / ${displayTotalFrames} fr`
|
||||
: `${formatTimecode(currentFrame, frameRate, videoTimeDisplayMode, startTimecode)} / ${formatTimecode(displayTotalFrames, frameRate, videoTimeDisplayMode, startTimecode)}`
|
||||
|
||||
return (
|
||||
<div
|
||||
|
||||
Reference in New Issue
Block a user