w3c / webrtc-pc

WebRTC 1.0 API
https://w3c.github.io/webrtc-pc/
Other
436 stars 115 forks source link

setCodecPreferences should take sequence<RTCRtpCodec> #2959

Closed jan-ivar closed 5 months ago

jan-ivar commented 5 months ago

setCodecPreferences's WebIDL currently looks like this:

undefined setCodecPreferences(sequence<RTCRtpCodecCapability> codecs);

...but it should probably be:

undefined setCodecPreferences(sequence<RTCRtpCodec> codecs);

...based on my understanding of intent which is to allow inputs from both capabilities and parameters:

transceiver.setCodecPreferences(RTCRtpReceiver.getCapabilities("video").codecs); // RTCRtpCodecCapability
transceiver.setCodecPreferences(receiver.getParameters().codecs);                // RTCRtpCodecParameters

This seems editorial to fix still, given:

image image

...but seems like something we should fix now to have the right extension points in the future.