Risks
Interoperability and Compatibility
Low; all Perfect Negotiation changes where discussed at the July 2, 2019 W3C WebRTC WG Meeting (slides), where public support was given from Chrome and Edge, as well as Firefox who was proposing the changes and already working on them.
All features have been Assigned or Started on the chromium code base by Google and Microsoft contributors.
Edge: In development
Firefox: Shipped or in development
Safari: No signals
Web / Framework developers: No signals
Please include links where possible. Examples include resolutions from relevant standards bodies (e.g. W3C Working Group), tracking bugs, or links to online conversations.
Ergonomics
Yes, these go together with the rest of the WebRTC signaling APIs and are mostly improvements to already-shipped features. Same performance, less prone to error.
Activation
No, the APIs are very similar to the existing APIs, it's typically a matter of invoking 1 method instead of 2.
2. setRemoteDescription() with "rollback"Rollback is a way to cancel an on-going negotiation. This is needed if two WebRTC endpoints attempt to send an offer at the same time, in this case, one of the endpoints have to cancel its local offer by rolling back so that it can accept the incoming offer. This way, it can complete the remote negotiation and the create a follow-up offer once back to stable. Without "rollback" you cannot get out of this situation, and you have to kill the WebRTC session and start over again.Rollback has existed in the spec for years and shipped by Firefox. Now that the API is improved to happen implicitly at setRemoteDescription(), we want to ship it too.
3. setLocalDescription() that implicitly creates the offer or answerShipped today in Chrome (and every other major browser) is createOffer(), createAnswer() and setLocalDescription() which are all asynchronous. The argument passed in to setLocalDescription() is the offer or answer generated by the createOffer() or createAnswer() methods. The change we want to ship for Perfect Negotiation is to create the offer or answer implicitly in the case that setLocalDescription() is called without an argument. This avoids a race that can currently happen if negotiation is started between creating the offer or answer and setLocalDescription(), in which case it will fail because it is in the wrong signaling state.
2. setRemoteDescription() with "rollback"Rollback is a way to cancel an on-going negotiation. This is needed if two WebRTC endpoints attempt to send an offer at the same time, in this case, one of the endpoints have to cancel its local offer by rolling back so that it can accept the incoming offer. This way, it can complete the remote negotiation and the create a follow-up offer once back to stable. Without "rollback" you cannot get out of this situation, and you have to kill the WebRTC session and start over again.Rollback has existed in the spec for years and shipped by Firefox. Now that the API is improved to happen implicitly at setRemoteDescription(), we want to ship it too.Was there another way to rollback that Firefox had for years before it happened implicitly in setRemoteDescription()? Or is it the same codepath but some tweaking has now made it non-racy in combination with the other negotiation APIs?
3. setLocalDescription() that implicitly creates the offer or answerShipped today in Chrome (and every other major browser) is createOffer(), createAnswer() and setLocalDescription() which are all asynchronous. The argument passed in to setLocalDescription() is the offer or answer generated by the createOffer() or createAnswer() methods. The change we want to ship for Perfect Negotiation is to create the offer or answer implicitly in the case that setLocalDescription() is called without an argument. This avoids a race that can currently happen if negotiation is started between creating the offer or answer and setLocalDescription(), in which case it will fail because it is in the wrong signaling state.This sounds good. Is it a non-racy equivalent to `pc.setLocalDescription(await pc.createOffer())`? If so, what about the case of `pc.createOffer(options)`, is there a non-racy way to do that?
As with `pc.createOffer({iceRestart:true})`, I wonder if web devs can be warned about the definitely-racy cases here?
3. setLocalDescription() that implicitly creates the offer or answerShipped today in Chrome (and every other major browser) is createOffer(), createAnswer() and setLocalDescription() which are all asynchronous. The argument passed in to setLocalDescription() is the offer or answer generated by the createOffer() or createAnswer() methods. The change we want to ship for Perfect Negotiation is to create the offer or answer implicitly in the case that setLocalDescription() is called without an argument. This avoids a race that can currently happen if negotiation is started between creating the offer or answer and setLocalDescription(), in which case it will fail because it is in the wrong signaling state.This sounds good. Is it a non-racy equivalent to `pc.setLocalDescription(await pc.createOffer())`? If so, what about the case of `pc.createOffer(options)`, is there a non-racy way to do that?Yes this is a non-racy version of that, internally the same algorithms are executed, but they are executed sequentially without risk of things happening in-between.Given the addition of restartIce(), you don't need "options" anymore. The only other option is voiceActivityDetection, which I wonder about... it seems to be a way to remove codecs from the SDP, but you can already control which codecs to offer/accept with the setCodecPreferences() API. I filed Is voiceActivityDetection still needed? on the spec.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/b75e66d8-2e59-4c1d-b0ae-87dffa17f974%40chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CAARdPYeyMGddy2wctb8Xck71SoV-6wi0boz5FSFtMRRnPQDZ4A%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to blin...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/5e500566-4ae4-489e-bef1-c77994b97c6f%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/5e500566-4ae4-489e-bef1-c77994b97c6f%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/5e500566-4ae4-489e-bef1-c77994b97c6f%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/4e282ad9-07de-4925-a9d8-c50ac374111f%40chromium.org.
This is already shipped in Firefox but it was dangerous to use in some edge cases. Now that stopped is negotiated safely, we want to implement it too.