W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > July 2017

Re: [webrtc-pc] Required fields in RTCRtpParameters returned from getParameters

From: Soares Chen via GitHub <sysbot+gh@w3.org>
Date: Tue, 18 Jul 2017 10:09:22 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-316019117-1500372561-sysbot+gh@w3.org>
I realize that the reason the WebIDL definition has all dictionary fields as optional is because it is used in multiple cases such as sender/receiver's getParameters, and there is different required fields for each case.

In that case the definitions for `getParameters()` in `RTCRtpSender` and `RTCRtpReceiver` should respectively list out the fields that are required to be set. Currently the requirements are somehow already there, but the wordings are pretty loose so it is a bit hard to get normative about it. For example:

> rtcp.cname is set to the CNAME of the associated RTCPeerConnection. rtcp.reducedSize is set to true if reduced-size RTCP has been negotiated for sending, and false otherwise.

This implies that `rtcp` field should be set, because you can't set attributes on `undefined`. `rtcp.cname` and `rtcp.reducedSize` seems to be required to be set as well, but it is not clear if `undefined` is allowed, e.g. before RTP connection is established?

> The headerExtensions sequence is populated based on the header extensions that have been negotiated for sending. 

This implies `headerExtensions` should at least be set to empty array.

> The codecs sequence is populated based on the codecs that have been negotiated for sending, and which the user agent is currently capable of sending.

It is not very clear if `codecs` can be empty array. Implementation should be expected to return at least one codecs. In any case `codecs` likely shouldn't be `undefined`.

> degradationPreference is set to the last value passed into setParameters, or the default value of "balanced" if setParameters hasn't been called. 

This is actually an optional field, because `degradationPreference` can be unset through `setParameters()`.

For `RTCRtpHeaderExtensionParameters`, according to RFC5285, at least the `uri` and `id` fields should be set, if `headerExtensions` contains any elements?

-- 
GitHub Notification of comment by soareschen
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/1493#issuecomment-316019117 using your GitHub account
Received on Tuesday, 18 July 2017 10:09:28 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:40 UTC