[webrtc-pc] setCodecPreferences() and removing a codec after initial negotiation (#2371)

henbos has just created a new issue for https://github.com/w3c/webrtc-pc:

== setCodecPreferences() and removing a codec after initial negotiation ==
Spin-off from #2368.

Suppose I do the following:
```
setCodecPreferences(VP8, VP9);
O/A exchange
setCodecPreference(VP8);
O/A exchange
```

What should/does happen?
1. In the second offer, the VP9 payload type is not listed, and the a=video line does not reference it.
2. In the second offer, the VP9 payload type is still listed, but the a=video line does not reference it.
3. Invalid SDP is generated because JSEP demands payload types be set in stone and the a=video line to reference all PTs in some order.

If either 1) or 2) happens then setCodecPreference() has the effect that I though we desired. It was my assumption that 1) is what happens, but if it turns out PTs are more like m= sections and cannot be unlisted, then 2) makes more sense.

On the other hand, if 3) is the case, then we need to update webrtc-pc to say that the second setCodecPreference() throws an exception because we're changing the set of codecs after the initial negotiation. This is not something we currently guard against.

@alvestrand @jan-ivar 

Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2371 using your GitHub account

Received on Tuesday, 26 November 2019 11:58:37 UTC