MediaStreamEvent.stream

Obsolete
This feature is obsolete. Although it may still work in some browsers, its use is discouraged since it could be removed at any time. Try to avoid using it.

The read-only property MediaStreamEvent.stream returns the MediaStream associated with the event.

Syntax

 var stream = event.stream;

Example

pc.onaddstream = function( ev ) {
                      alert("A stream (id: '" + 
                            ev.stream.id + 
                            "') has been added to this connection.");
                   };

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
stream
Deprecated
Chrome Full support YesEdge Full support 15Firefox Full support YesIE No support NoOpera Full support YesSafari ? WebView Android Full support YesChrome Android Full support YesFirefox Android ? Opera Android ? Safari iOS ? Samsung Internet Android Full support Yes

Legend

Full support Ā 
Full support
No support Ā 
No support
Compatibility unknown Ā 
Compatibility unknown
Deprecated. Not for use in new websites.
Deprecated. Not for use in new websites.

See also