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
- RTCPeerConnection.addstream_event, RTCPeerConnection.removestream_event
- RTCPeerConnection
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
