We're looking for a person or people to help audit MDN to find places we could speed up. Is this you or someone you know? Check out the RFP: https://mzl.la/2IHcMiE


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 is an experimental technology
Check the Browser compatibility table carefully before using this in production.

The RTCPeerConnection.removeStream() method removes a MediaStream as a local source of audio or video. If the negotiation already happened, a new one will be needed for the remote peer to be able to use it. Because this method has been deprecated, you should instead use removeTrack() if your target browser versions have implemented it.

If the signalingState is set to "closed", an InvalidStateError is raised. If the signalingState is set to "stable", the event negotiationneeded is sent on the RTCPeerConnection.




A MediaStream specifying the stream to remove from the connection.

Return value



var pc, videoStream;
navigator.getUserMedia({video: true}, function(stream) {
  pc = new RTCPeerConnection();
  videoStream = stream;
document.getElementById("closeButton").addEventListener("click", function(event) {
}, false);


Specification Status Comment
WebRTC 1.0: Real-time Communication Between Browsers
The definition of 'RTCPeerConnection.removeStream()' in that specification.
Candidate Recommendation Initial specification.

Browser compatibility

FeatureChromeEdgeFirefoxInternet ExplorerOperaSafari
Basic support56 Yes22 ?


37 — 43

FeatureAndroid webviewChrome for AndroidEdge mobileFirefox for AndroidOpera AndroidiOS SafariSamsung Internet
Basic support5656 Yes44


37 — 43

? ?

1. Promise based version.

See also

Document Tags and Contributors

 Contributors to this page: fscholz, Jib, Sheppy, jpmedley, abbycar, teoli
 Last updated by: fscholz,