This is an experimental technology
Check the Browser compatibility table carefully before using this in production.
The MediaStream()
constructor returns a newly-created MediaStream
, either empty or containing tracks, provided as an argument.
stream = new MediaStream(); stream = new MediaStream(stream); stream = new MediaStream(tracks[]);
stream
MediaStream
containing tracks to add.tracks
Array
of MediaStreamTrack
s to add.A newly-created MediaStream
object, either empty, or containing the tracks provided, if any.
Specification | Status | Comment |
---|---|---|
Media Capture and Streams The definition of 'MediaStream' in that specification. | Candidate Recommendation |
Desktop | ||||||
---|---|---|---|---|---|---|
Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | |
Basic support | 55 | Yes | 44 | No | 42 | No |
Mobile | |||||||
---|---|---|---|---|---|---|---|
Android webview | Chrome for Android | Edge Mobile | Firefox for Android | Opera for Android | iOS Safari | Samsung Internet | |
Basic support | 55 | 55 | Yes | 42 | ? | No | 6.0 |
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/MediaStream/MediaStream