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

Function clampVolume

packages/core/src/runtime/media.ts:126–129  ·  view source on GitHub ↗
(volume: number)

Source from the content-addressed store, hash-verified

124const lastRuntimeAppliedVolume = new WeakMap<HTMLMediaElement, number>();
125
126function clampVolume(volume: number): number {
127 if (!Number.isFinite(volume)) return 1;
128 return Math.max(0, Math.min(1, volume));
129}
130
131// fallow-ignore-next-line complexity
132export function syncRuntimeMedia(params: {

Callers 1

syncRuntimeMediaFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected