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

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
Basic supportChrome Full support 47
Notes
Full support 47
Notes
Notes Prior to Chrome 49, only video is supported, not audio.
Edge ? Firefox Full support 25IE ? Opera Full support 36Safari ? WebView Android Full support 49Chrome Android Full support 49Edge Mobile ? Firefox Android Full support 25Opera Android Full support 36Safari iOS ? Samsung Internet Android No support No

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown
See implementation notes.
See implementation notes.

See also

Document Tags and Contributors

Contributors to this page: lucian95, Sheppy, jpmedley, Sebastianz, teoli, chrisdavidmills
Last updated by: lucian95,