Web/API/MediaRecorder/stream

From Get docs


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

Syntax

var stream = MediaRecorder.stream

Values

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

Example

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 Status Comment
MediaStream RecordingThe definition of 'MediaRecorder.stream' in that specification. Working Draft Initial definition

Browser compatibility

Update compatibility data on GitHub

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
stream

Chrome Full support 49


Full support 49


No support 47 — 49

Notes'

Notes' Prior to Chrome 49, only video is supported, not audio.

Edge

Full support 79

Firefox

Full support 25

IE

No support No

Opera

Full support 36

Safari

No support No

WebView Android

Full support 49

Chrome Android Full support 49


Full support 49


No support 47 — 49

Notes'

Notes' Prior to Chrome 49, only video is supported, not audio.

Firefox Android

Full support 25

Opera Android

Full support 36

Safari iOS

No support No

Samsung Internet Android

Full support 5.0

Legend

Full support  
Full support
No support  
No support
See implementation notes.'
See implementation notes.


See also