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
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
stream
|
Chrome Full support 49 Full support 49 No support 47 — 49 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' 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
- Using the MediaRecorder API
- [[../../../../../../../mdn.github.io/web-dictaphone/index|Web Dictaphone]]: MediaRecorder + getUserMedia + Web Audio API visualization demo, by Chris Mills (source on Github.)
- simpl.info MediaStream Recording demo, by Sam Dutton.
Navigator.getUserMedia
MediaRecorder.stream by Mozilla Contributors is licensed under CC-BY-SA 2.5.