-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make stop() safe and affect createOffer only. Replace attributes with "stopped" direction. #2220
Conversation
@henbos This is based on what we discussed. PTAL. In short, the PR creates a new Renamed old dangerous stop to I had to audit existing places the spec reads Stop reading now if you don't care about edge cases... The good news is that the setting an RTCSessionDescription algorithm did not look at This means most of our negotiation event firing code already runs on stopped transceivers today, something I verified in Firefox with this fiddle. That may sound bad, but is actually quite orthogonal and seems benign to me, since it's basically shuffling around For example: an edge-case is where a fixed-role answerer may end up staying in |
Of course I care ;) I'll review carefully tomorrow |
Need to remove the reject() portion. |
Removes So instead of reading a stopping attribute, use: if (tc.direction == "stopped") { Instead of reading the old stopped attribute (which now only happens from SRD) use: if (tc.currentDirection == "stopped") { Keeps the old tc.stop();
console.log(tc.direction); // stopped
console.log(tc.currentDirection); // sendrecv
doSignalingHandshake();
console.log(tc.direction); // stopped
console.log(tc.currentDirection); // stopped Note how the final value of |
Travis seems unhappy. Some kind of respec issue? I can't make out the problem here. |
Apparently a transient problem, it works OK now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to see this PR, I think it's good. Just one comment.
This has just been deprecated in the specification. Initial content changes have been made to note this is incoming and to prepare developers to switch to the new way to detect stopped transceivers. Further updates will come when the change is implemented in browsers. Reference: * w3c/webrtc-pc#2220 Content changes: * https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stopped * https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stop
This has just been deprecated in the specification. Initial content changes have been made to note this is incoming and to prepare developers to switch to the new way to detect stopped transceivers. Further updates will come when the change is implemented in browsers. Reference: * w3c/webrtc-pc#2220 Content changes: * https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stopped * https://developer.mozilla.org/en-US/docs/Web/API/RTCRtpTransceiver/stop
Fixes #2150 and #2176. For consideration.
Preview | Diff