MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / handleScrubAt

Function handleScrubAt

packages/player/src/controls.ts:285–289  ·  view source on GitHub ↗
(clientX: number)

Source from the content-addressed store, hash-verified

283 document.addEventListener("click", onDocClick);
284
285 const handleScrubAt = (clientX: number) => {
286 const rect = scrubber.getBoundingClientRect();
287 const fraction = Math.max(0, Math.min(1, (clientX - rect.left) / rect.width));
288 callbacks.onSeek(fraction);
289 };
290
291 let scrubbing = false;
292

Callers 3

createControlsFunction · 0.85
onMouseMoveFunction · 0.85
onTouchMoveFunction · 0.85

Calls 1

getBoundingClientRectMethod · 0.80

Tested by

no test coverage detected