Re: [webrtc-pc] Handling of simulcast errors

Let's step back a bit and consider what could possibly cause `setParameters` to fail (for reasons besides modifying a read-only parameter). As far as I can tell, the causes are:

1. Codecs were reordered, and the one on top is no longer available.
2. One of the `RTCRtpEncodingParameters` members, such as `maxFramerate` or `scaleDownResolutionBy`, is unachievable?
3. Too many `RTCRtpEncodingParameters` are active for the codec.

If that's really it, let's just add three new types to the `RTCError` type enum:

1. "codec-unavailable", with additional parameter that tells which codec is unavailable.
2. "invalid-encoding-parameter", with additional parameters that tell which parameter is invalid, and what its value was.
3. "too-many-encodings" (or a better name, I'm blanking), with an additional parameter to indicate how many encodings *are* supported.

This seems pretty simple, and would be more intuitive/useful to application developers than my "parameters dictionary subset" idea.

-- 
GitHub Notification of comment by taylor-b
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/763#issuecomment-292080816 using your GitHub account

Received on Thursday, 6 April 2017 06:27:10 UTC