-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
can't use MUST on scaleResolutionDownBy input #493
Comments
Should it be restricted to > 1.0? ScaleResolutionDownBy=0.0001 seems a bit dangerous.. |
@burnburn what's the error most fitting for "this parameter has a stupid value"? |
@alvestrand I agree. @burnburn There's a precedent for |
Or maybe that's a stretch, since |
Or we could use SyntaxError (see http://heycam.github.io/webidl/#idl-DOMException-error-names). I think either works. |
I think |
|
On a side-note I'm a bit amused that there's apparently a |
Our DOM folks suggested throwing a simple https://encoding.spec.whatwg.org/#dom-textencoder |
InvalidParameter exception? |
Where is that defined? |
There is no InvalidParameter here (http://heycam.github.io/webidl/#idl-DOMException-error-names). I wish there were! Anyway, I'm okay with RangeError unless/until a better suggestion occurs. I was aware of the SyntaxError being primarily for strings, but we are clearly having to stretch definitions since we are limited in the list of errors. Jan-Ivar, I won't object if you submit a PR with RangeError. If you'd rather I do it, let me know. |
Sure, would this go in the processing model of Funny, I see setParameters already rejects with
Is that an issue (reusing the same error)? |
Maybe the read-only error should be |
Agreed. I was just about to type exactly the same thing. InvalidModificationError for the read-only, and RangeError for the bad value. |
@burnburn - Agree that we should use a distinct error for a bad value as opposed to an invalid modification. |
@alvestrand - I agree that scaleResolutionDownBy should be required to be greater than or equal to 1, not just greater than 0. |
I think we can close this now. |
http://w3c.github.io/webrtc-pc/#widl-RTCRtpEncodingParameters-scaleResolutionDownBy says: "The value must be greater than 0." which isn't actionable.
The spec should instead specify what MUST happen when the input value is 0 or less. Throw a TypeError? ignore?
The text was updated successfully, but these errors were encountered: