MediaStreamEvent: stream property
WebRTC
WebRTC
The read-only property MediaStreamEvent.stream returns
the MediaStream associated with the event.
Example
pc.onaddstream = (ev) => {
alert(`A stream (id: '${ev.stream.id}') has been added to this connection.`);
};
Browser compatibility
See also
- addstream, removestream
- RTCPeerConnection