[webrtc-pc] setCodecPreferences should take sequence<RTCRtpCodec> (#2959)

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

== setCodecPreferences should take sequence<RTCRtpCodec> ==
[setCodecPreferences](https://w3c.github.io/webrtc-pc/#dom-rtcrtptransceiver-setcodecpreferences)'s WebIDL currently looks like this:
```webidl
undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);
```
...but it should probably be:
```webidl
undefined setCodecPreferences(sequence<RTCRtpCodec> codecs);
```

...based on my understanding of intent which is to allow inputs from both capabilities and parameters: 
```js
transceiver.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs); // RTCRtpCodecCapability
transceiver.setCodecPreferences(receiver.getParameters().codecs);                // RTCRtpCodecParameters
```

This seems editorial to fix still, given:
<img width="689" alt="image" src="https://github.com/w3c/webrtc-pc/assets/3136226/74316e0f-47be-40d7-866c-f292a8933510">
<img width="599" alt="image" src="https://github.com/w3c/webrtc-pc/assets/3136226/0dc0f80e-27c2-4d18-8cb4-9d78060b7b30">
...but seems like something we should fix now to have the right extension points in the future.

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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 17 April 2024 19:30:27 UTC