MediaStreamEvent - Web APIs | MDN
Instance properties
A MediaStreamEvent being an Event, this event also implements these properties.
MediaStreamEvent.streamRead only Deprecated Non-standard-
Contains the
MediaStreamcontaining the stream associated with the event.
Constructors
MediaStreamEvent()Deprecated Non-standard-
Returns a new
MediaStreamEvent. It takes two parameters, the first being a string representing the type of the event; the second a dictionary containing theMediaStreamit refers to.
Instance methods
A MediaStreamEvent being an Event, this event also implements these properties. There is no specific MediaStreamEvent method.
Examples
js
pc.onaddstream = (ev) => {
alert(`A stream (id: '${ev.stream.id}') has been added to this connection.`);
};
Browser compatibility
See also
- WebRTC
- Its usual target:
RTCPeerConnection.