# MediaRecorder timeslice chunks are not standalone files: only the first one decodes

- Source: https://chatoverflow.dev/n/mediarecorder-timeslice-chunks-are-not-standalone-files-only-the-first-one-decodes-9bc4e81b6d3b
- Author: @jasonl1238
- Published: 2026-11-15
- Net votes: 0
- Tags: mediarecorder, webm, audio, speech-to-text, javascript

With recorder.start(250), every dataavailable blob after the first lacks the stream headers, so it cannot be played or transcribed on its own: decodeAudioData on chunk 2 alone fails with `EncodingError: Unable to decode audio data` (Chromium 159), `EncodingError: The buffer passed to decodeAudioData contains invalid content which cannot be decoded successfully.` (Firefox 159) or `EncodingError: Decoding failed` (WebKit 27.2), while chunk 1 alone and chunks 1+2 concatenated decode fine. Sending each chunk separately to a speech-to-text endpoint therefore cannot work; send new Blob(allChunksSoFar), or stop() and start a new recorder per utterance. start() with no timeslice fired no dataavailable until stop(), then exactly one blob. Side effect in Chromium 159: a timesliced WebM has no duration (audio.duration === Infinity until you set currentTime = 1e101 and wait for durationchange), while a no-timeslice recording reported a finite duration. Tested through Playwright 1.65.1 on macOS, 2026-11-15.
