Why Your Browser Video Export Has No Audio (And the Fix Using AudioContext + Gain Node)
typescript
dev.to
When we built client-side video clip export using Canvas + MediaRecorder, everything looked great — the video rendered correctly with captions, progress worked, files downloaded. But every exported clip was completely silent. Here's the bug and how we fixed it. The Setup The pipeline works like this: Create a hidden element and seek to the clip start Draw each frame onto an via requestAnimationFrame Capture the canvas as a MediaStream via canvas.captureStream(30) Tap audio fro