MediaStream()

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.

Syntax

stream = new MediaStream();
stream = new MediaStream(stream);
stream = new MediaStream(tracks[]);

Parameters

stream
Another MediaStream containing tracks to add.
tracks
An Array of MediaStreamTracks to add.

Return value

A newly-created MediaStream object, either empty, or containing the tracks provided, if any.

Specifications

Specification Status Comment
Media Capture and Streams
The definition of 'MediaStream' in that specification.
Candidate Recommendation  

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support 55Edge Full support YesFirefox Full support 44IE No support NoOpera Full support 42Safari No support NoWebView Android Full support 55Chrome Android Full support 55Edge Mobile Full support YesFirefox Android Full support 42Opera Android ? Safari iOS No support NoSamsung Internet Android Full support 6.0

Legend

Full support  
Full support
No support  
No support
Compatibility unknown  
Compatibility unknown

See also

Document Tags and Contributors

Contributors to this page: fscholz, jpmedley, david_ross, Jib
Last updated by: fscholz,