Closed youennf closed 1 year ago
Agreed, throwing is for when the config is structurally invalid. Other reasons should produce a VideoEncoderSupport
with supported === false
.
OK, I'll update the WPT test.
@sandersdan, could you look at WPT https://github.com/web-platform-tests/wpt/pull/40691 ?
@sandersdan, could you look at WPT web-platform-tests/wpt#40691 ?
Looks good to me, but note that I don't have the power to approve WPT changes.
According the spec, VideoEncoder.isConfigSupported only throws in case https://w3c.github.io/webcodecs/#valid-videoencoderconfig returns false. The test (and Chrome) is expecting to throw in more cases, like if width or height is very big. Either we should update the spec accordingly or VideoEncoder.isConfigSupported should return supported = false in that case.