Calling RTCPeerConnection.removeTrack with a RTCRtpSender does not set the sender's "track" attribute to null. This is against the the specification: https://www.w3.org/TR/webrtc/#removeTrack Both Chrome and Firefox do this and it is important to determining if a sender has been removed after renegotiation.
Simple way to reproduce: ``` var config = { "iceTransports": 'all', "iceServers": [{ "urls": "stun:global.stun.twilio.com:3478?transport=udp" }] } var pc = new RTCPeerConnection(config) var getUserMedia = (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia).bind(navigator) getUserMedia({ video: true, audio: true }, function(stream) { var track = stream.getTracks()[0] var sender = pc.addTrack(track, stream) pc.removeTrack(sender) console.log(sender.track) // should be null }, function(err) { throw err }) ```
Created attachment 335641 [details] Patch
Comment on attachment 335641 [details] Patch Clearing flags on attachment: 335641 Committed r229587: <https://trac.webkit.org/changeset/229587>
All reviewed patches have been landed. Closing bug.
<rdar://problem/38431087>