MediaRecorder.stream

The MediaRecorder.stream read-only property returns the stream that was passed into the MediaRecorder() constructor when the MediaRecorder was created.

Value

The MediaStream passed into the MediaRecorder() constructor when the MediaRecorder was originally created.

Examples

if (navigator.getUserMedia) {
   console.log('getUserMedia supported.');
   navigator.getUserMedia (
      // constraints - only audio needed for this app
      {
         audio: true
      },

      // Success callback
      function(stream) {
           var mediaRecorder = new MediaRecorder(stream);

           var myStream = mediaRecorder.stream;
           console.log(myStream);

...

Specifications

Specification
MediaStream Recording
# dom-mediarecorder-stream

Browser compatibility

BCD tables only load in the browser

See also