The MediaRecorder.stream
read-only property returns the stream that was passed into the MediaRecorder()
constructor when the MediaRecorder
was created.
The MediaRecorder.stream
read-only property returns the stream that was passed into the MediaRecorder()
constructor when the MediaRecorder
was created.
The MediaStream passed into the MediaRecorder()
constructor when the MediaRecorder
was originally created.
js
if (navigator.getUserMedia) { console.log("getUserMedia supported."); navigator.getUserMedia( // constraints - only audio needed for this app { audio: true, }, // Success callback (stream) => { const mediaRecorder = new MediaRecorder(stream); const myStream = mediaRecorder.stream; console.log(myStream); }, ); }
Specification |
---|
MediaStream Recording # dom-mediarecorder-stream |
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | WebView Android | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | |
stream |
4947–49Before Chrome 49, only video is supported, not audio. |
79 | 25 | No | 36 | 14.1 | 49 | 4947–49Before Chrome 49, only video is supported, not audio. |
25 | 36 | 14 | 5.0 |
Navigator.getUserMedia
© 2005–2023 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder/stream