MediaRecorder.stream

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 Recording
The definition of 'MediaRecorder.stream' in that specification.
Working Draft Initial definition

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
streamChrome 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 79Firefox Full support 25IE No support NoOpera Full support 36Safari No support NoWebView Android Full support 49Chrome 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 25Opera Android Full support 36Safari iOS No support NoSamsung Internet Android Full support 5.0

Legend

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

See also