Re: [webrtc-pc] Inconsistent initialization of scaleResolutionDownBy (#2730)

> Another thing; it probably doesn't make much sense to throw RangeError when scaleResolutionDownBy is undefined in setParameters. If we want to throw something in this case, I think InvalidModificationError is appropriate.

I don't think we should throw. Safari (the only browser that defaults to `scaleResolutionDownBy: 1` correctly) [treats](https://jsfiddle.net/jib1/osme6x5d/) absence of `scaleResolutionDownBy` in _setParameters_ as `scaleResolutionDownBy: 1`.

This seems correct as it's what would have happened had we been able to specify a default value for `scaleResolutionDownBy` in WebIDL like we do for the other parameters, as @alvestrand mentions in https://github.com/w3c/webrtc-pc/issues/2730#issuecomment-1120469775.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-pc/issues/2730#issuecomment-1256680231 using your GitHub account


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

Received on Friday, 23 September 2022 21:08:11 UTC