Web/API/MediaStreamEvent/stream

From Get docs

ObsoleteThis 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

Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet

stream

Deprecated'

Chrome

Full support Yes

Edge

Full support 15

Firefox

Full support Yes

IE

No support No

Opera

Full support Yes

Safari

?

WebView Android

Full support Yes

Chrome Android

Full support Yes

Firefox 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