-
Notifications
You must be signed in to change notification settings - Fork 114
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
Specify what should happen if filtering [[PreferredCodecs]] on direction results in empty list #2936
Comments
The list of codecs is empty so the m-line is rejected in the offer (port 0) and calling setLocalDescription with it causes the transceiver to be stopped. |
I would rather act as if you have no preference than to have the transceiver blow up. Also if we stop transceivers before offer in other contexts I'm not sure we offer it, or if we do what about offerer tagged m= section and the stopping vs stopped state. Probably less error prone to simply act as if you have no preference |
No preference would be against the users intent to set codec preferences. Rejecting and stopping the transceiver when there is nothing in common is more consistent with the same results when you get a remote answer with no codecs in comon |
Why would me saying which codecs I prefer to receive make a If this was "just receiver preferences", then
To safely change direction, the app needs to remember to clear their preferences or to always add dummy codecs just for the sake of having SOMETHING in the offer. Even if that something is not what the other endpoint is interested in. It's a footgun. Possible workaround:
But I think whether we fail hard or patch this issue with workarounds, I think it's clear that receiver preferences ARE relevant for senders. JSEP does not allow not offering anything, and what we offer - even in a sendonly use case - are the "receiving" codec preferences. Receiving in scare-quotes. |
Another workaround could be: if you end up with the empty set, make sure we always have something to offer by adding a sendrecv codec of the UA's choice. |
Filed #2937 for a more concrete example |
which avoids throwing an error when using setCodecPreferences to set a recvonly codec on a sendonly transceiver. See w3c/webrtc-pc#2936 BUG=webrtc:15396 Change-Id: I435a98c944ed2eeef87d9b8a7f791d095ec25502 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338642 Reviewed-by: Harald Alvestrand <[email protected]> Reviewed-by: Florent Castelli <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/main@{#41843}
Upstream commit: https://webrtc.googlesource.com/src/+/20a90295fcea910dc774df0bbd0e65e13606c2e8 sdp: set content to rejected if the list of common codecs is empty which avoids throwing an error when using setCodecPreferences to set a recvonly codec on a sendonly transceiver. See w3c/webrtc-pc#2936 BUG=webrtc:15396 Change-Id: I435a98c944ed2eeef87d9b8a7f791d095ec25502 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338642 Reviewed-by: Harald Alvestrand <[email protected]> Reviewed-by: Florent Castelli <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/main@{#41843}
Upstream commit: https://webrtc.googlesource.com/src/+/20a90295fcea910dc774df0bbd0e65e13606c2e8 sdp: set content to rejected if the list of common codecs is empty which avoids throwing an error when using setCodecPreferences to set a recvonly codec on a sendonly transceiver. See w3c/webrtc-pc#2936 BUG=webrtc:15396 Change-Id: I435a98c944ed2eeef87d9b8a7f791d095ec25502 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/338642 Reviewed-by: Harald Alvestrand <[email protected]> Reviewed-by: Florent Castelli <[email protected]> Commit-Queue: Philipp Hancke <[email protected]> Cr-Commit-Position: refs/heads/main@{#41843}
If you have no preference, you O/A with all codecs.
But if you have a recvonly codec preferences, and the transceiver is sendonly, the createOffer() filtering would result in an empty list.
The text was updated successfully, but these errors were encountered: