Deprecated
This feature has been removed from the Web standards. Though some browsers may still support it, it is in the process of being dropped. Avoid using it and update existing code if possible; see the compatibility table at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.
This event has been removed from the WebRTC specification in favor of the existing removetrack event on the remote MediaStream and the corresponding MediaStream.onremovetrack event handler property of the remote MediaStream. The RTCPeerConnection API is now track-based, so having zero tracks in the remote stream is equivalent to the remote stream being removed and the old removestream event.
The removestream event indicates that a MediaStream has been removed from the RTCPeerConnection which received the event. You can use the RTCPeerConnection interface's onremovestream property to set a handler for this event.
MediaStreamEventRTCPeerConnectionSince MediaStreamEvent is based on Event, this event also implements its properties.
stream Read only
MediaStream that has been removed from the target.Since MediaStreamEvent is based on Event, this event also implements its methods. There are no specific MediaStreamEvent methods.
| Specification | Status | Comment |
|---|---|---|
| WebRTC 1.0: Real-time Communication Between Browsers The definition of 'removestream' in that specification. | Candidate Recommendation |
| Feature | Chrome | Edge | Firefox (Gecko) | Internet Explorer | Opera | Safari |
|---|---|---|---|---|---|---|
| Basic support | (Yes) | (Yes) |
18 (18) [1] Removed in Firefox 60 | No support | (Yes) | ? |
| Feature | Android | Chrome for Android | Edge | Firefox Mobile (Gecko) | IE Mobile | Opera Mobile | Safari Mobile |
|---|---|---|---|---|---|---|---|
| Basic support | ? | ? | (Yes) |
18 (18) [1] Removed in Firefox 60 | No support | ? | ? |
[1] This event was introduced in Firefox 18, but was removed outright in Firefox 60. As of Firefox 59, you can use the onremovetrack property of the remote MediaStream instead, and check when the number of tracks in the stream go to zero. Be aware that having zero sending tracks and no data channel may cause ICE failure in Firefox 58 and earlier.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/Events/removestream