diff --git a/www/app/[domain]/transcripts/player.tsx b/www/app/[domain]/transcripts/player.tsx index cd3703f4..59cdb91f 100644 --- a/www/app/[domain]/transcripts/player.tsx +++ b/www/app/[domain]/transcripts/player.tsx @@ -3,7 +3,7 @@ import React, { useRef, useEffect, useState } from "react"; import WaveSurfer from "wavesurfer.js"; import RegionsPlugin from "wavesurfer.js/dist/plugins/regions.esm.js"; -import { formatTime } from "../../lib/time"; +import { formatTime, formatTimeMs } from "../../lib/time"; import { Topic } from "./webSocketTypes"; import { AudioWaveform } from "../../api"; import { waveSurferStyles } from "../../styles/recorder"; @@ -159,9 +159,7 @@ export default function Player(props: PlayerProps) { const timeLabel = () => { if (props.mediaDuration && Math.floor(props.mediaDuration / 1000) > 0) - return `${formatTime(currentTime)}/${formatTime( - Math.floor(props.mediaDuration / 1000) - )}`; + return `${formatTime(currentTime)}/${formatTimeMs(props.mediaDuration)}`; return ""; }; diff --git a/www/app/[domain]/transcripts/recorder.tsx b/www/app/[domain]/transcripts/recorder.tsx index 023ce470..d583bb74 100644 --- a/www/app/[domain]/transcripts/recorder.tsx +++ b/www/app/[domain]/transcripts/recorder.tsx @@ -3,7 +3,7 @@ import React, { useRef, useEffect, useState } from "react"; import WaveSurfer from "wavesurfer.js"; import RecordPlugin from "../../lib/custom-plugins/record"; -import { formatTime } from "../../lib/time"; +import { formatTime, formatTimeMs } from "../../lib/time"; import { waveSurferStyles } from "../../styles/recorder"; import { useError } from "../../(errors)/errorContext"; import FileUploadButton from "./fileUploadButton"; @@ -241,8 +241,8 @@ export default function Recorder(props: RecorderProps) { }, [record, screenMediaStream]); const timeLabel = () => { - if (isRecording) return formatTime(currentTime); - if (duration) return `${formatTime(currentTime)}/${formatTime(duration)}`; + if (isRecording) return formatTimeMs(currentTime); + if (duration) return `${formatTimeMs(currentTime)}/${formatTime(duration)}`; return ""; };