MCPcopy Create free account
hub / github.com/Moebytes/Frame-Player / getPos

Function getPos

components/VideoPlayer.tsx:467–471  ·  view source on GitHub ↗
(time: number, duration: number, totalFrames: number)

Source from the content-addressed store, hash-verified

465 }, [brightness, contrast, hue, saturation, lightness, blur, sharpen])
466
467 const getPos = (time: number, duration: number, totalFrames: number) => {
468 if (duration === 0) return 0
469 const ratio = time / duration
470 return Math.floor(ratio * totalFrames)
471 }
472
473 useEffect(() => {
474 let loaded = videoLoaded || animationLoaded

Callers 1

VideoPlayerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected