Closed Bug 1523563 Opened 2 years ago Closed 2 years ago

MediaRecorder cannot record audio-only webm


(Core :: Audio/Video: Recording, enhancement, P3)




Tracking Status
firefox69 --- fixed


(Reporter: pehrsons, Assigned: pehrsons)




(6 files)

The EbmlComposer that writes webm clusters refuses to flush a cluster unless a VP8 keyframe has been encoded, even if we're doing an audio-only recording.

Somewhere along the way this must have gotten broken.
Until this, passing mime type to MediaRecorder has had no effect.

This patch does two things:

  1. Passes the mime type through from MediaRecorder to MediaEncoder
  2. Gives preference to the mime type when passed, wrt picking codecs,
    however, we still yield to a video mime type when given a video track
    since that's how both Firefox and Chromium function today.

Proper spec handling of mime type will be fixed in bug 1512175.

Depends on D35170

From the previous patch, if ogg is disabled we'll fallback on video/webm.
So some tests relying on errors need it disabled too, in order to pass.

Depends on D35171

This does two things:

  • Makes the code for how flushing works actually readable (seriously).
  • Allows audio-only webms.

Depends on D35172

Duplicate of this bug: 1501308
Blocks: 1014393
Pushed by
Modernize test_mr_record_audionode.html. r=jib
Test all mime types with audio node recording. r=jib
Pass in mime type to MediaEncoder and give preference to it when passed. r=jib
Make mochitests pass with new video/webm fallback. r=jib
Make sense of EbmlComposer. r=bryce
Modernize test_gUM_audioCapture.html somewhat. r=jib
Blocks: 1563520
Duplicate of this bug: 1421953
You need to log in before you can comment on or make changes to this bug.