[webrtc-pc] addTransceiver: 1 sendEncodings vs 0 sendEncodings (#2856)

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

== addTransceiver: 1 sendEncodings vs 0 sendEncodings ==
I found this note in [addTransceiver](https://w3c.github.io/webrtc-pc/#dom-rtcpeerconnection-addtransceiver) and I am wondering if it is reflecting legacy behavior.

> NOTE
> Providing a single, default [RTCRtpEncodingParameters](https://w3c.github.io/webrtc-pc/#dom-rtcrtpencodingparameters) in sendEncodings allows the application to subsequently set encoding parameters using [setParameters](https://w3c.github.io/webrtc-pc/#dom-rtcrtpsender-setparameters), even when simulcast isn't used.

This note makes it sound like there is something special about specifying a single encoding. It doesn't say it, but it seem to imply that if you had _not_ specified a single encoding, setParameters() may not have been usable in singlecast. But that doesn't make sense, because there's no such thing as having 0 sendEncodings. If you don't specify any sendEncodings, you get singlecast by default, so surely setParameters() would work with that single encoding regardless.

A few milestones ago Chromium did treat 0 sendEncodings and 1 sendEncodings subtly differently, but this was patched as a bugfix. But finding this note now, I'm curious as to why it is phrased this way?

Should we clarify that "0 sendEncodings == 1 sendEncodings with default values"?

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


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

Received on Wednesday, 12 April 2023 07:41:37 UTC