Skip to content

🎥 Make videos programmatically with React

clamp volume to 1

Jonny Burger31d141da442c
diff --git a/packages/core/src/use-amplification.ts b/packages/core/src/use-amplification.ts
index 5267493e5b..a88389f3a6 100644
--- a/packages/core/src/use-amplification.ts
+++ b/packages/core/src/use-amplification.ts
@@ -65,7 +65,7 @@ export const useAmplification = ({
});
const gainNode = new GainNode(audioContext, {
- gain: currentVolumeRef.current,
+ gain: Math.max(currentVolumeRef.current, 1),
});
audioStuffRef.current = {