(time: number)
| 1 | export const STUDIO_PREVIEW_FPS = 30; |
| 2 | |
| 3 | export function formatTime(time: number): string { |
| 4 | if (!Number.isFinite(time) || time < 0) return "0:00"; |
| 5 | const mins = Math.floor(time / 60); |
| 6 | const secs = Math.floor(time % 60); |
| 7 | return `${mins}:${secs.toString().padStart(2, "0")}`; |
| 8 | } |
| 9 | |
| 10 | export function secondsToFrame(time: number, fps = STUDIO_PREVIEW_FPS): number { |
| 11 | if (!Number.isFinite(time) || time <= 0) return 0; |
no outgoing calls
no test coverage detected