-
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
setCodecPreferences should trigger negotiationneeded #2964
Comments
Concern was raised in yesterday's meeting over the web compatibility of introducing this change in behavior now. Let's examine cases where existing websites might feature-detect and call No breakage:
Breakage of intent:
Negotiation completes but logs an error:
Negotiation breaks:
Happy to field questions on any of these. |
It's a stretch of the imagination, but one can imagine a setup like this (equivalent to your "breakage of intent" setup):
The change will then cause an extra negotiation without the media tracks, which may or may not have any bad effects. |
This order seems unlikely, since there's no transceiver to call setCodecPreferences on ahead of addTrack. |
setCodecPreferences "overrides the default receive codec preferences used by the user agent", but negotiation is needed before changes affect transmission. Example:
setCodecPreferences
¹Oddly,
setCodecPreferences
doesn't triggernegotiationneeded
, so the fiddle has to call its ownpc1.onnegotiationneeded()
explicitly as a workaround. Unfortunately, this hack risks introducing intermittent timing issues with other negotiation needs.Proposal: make
setCodecPreferences
triggernegotiationneeded
as needed.The "as needed" part might require some judgement: it's sometimes desirable to call
setCodecPreferences
in"have-remote-offer"
just in time to affect an answer. Since answers can carry just as much weight as offers (arguably more), it might be undesirable to trigger what would be a reverse-role negotiation in this case (once it returns to"stable"
).We'd need to work out these details in the check if negotiation is needed algorithm. Language similar to how we handle direction there might work (i.e. consider a match in the local description satisfactory regardless of whether it's an offer or an answer).
1. Works in Chrome/Edge and Safari right now. Landing soon in Firefox 127.
The text was updated successfully, but these errors were encountered: