Vincent
Vincent

Reputation: 443

Corrupt Blob triggered by mediaRecorder.requestData()

I have an issues with Audio Web API. Why when I use mediaRecorder.requestData(); instead MediaRecorder.stop() of the Blob retrieve from dataavailable event is "corrupt".

See here an example of output

Upvotes: 4

Views: 671

Answers (1)

Adib Zaini
Adib Zaini

Reputation: 256

Only the first blob from ondataavailable event will contain file signature. The rest will not contain it, hence it is not playable. You need to concatenate the blobs into one big blob.

Quoting from bugzilla

My understanding of the spec is that this bug is invalid; i.e., individual blobs are not individually decodable in general; they must be concatenated to produce a usable resource. And that's what we implemented.

Upvotes: 1

Related Questions