w3c / webcodecs

WebCodecs is a flexible web API for encoding and decoding audio and video.
https://w3c.github.io/webcodecs/
Other
987 stars 136 forks source link

https://wpt.fyi/results/webcodecs/video-encoder-config.https.any.html is expecting VideoEncoder.isConfigSupported to throw #686

Closed youennf closed 1 year ago

youennf commented 1 year ago

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.

sandersdan commented 1 year ago

Agreed, throwing is for when the config is structurally invalid. Other reasons should produce a VideoEncoderSupport with supported === false.

youennf commented 1 year ago

OK, I'll update the WPT test.

youennf commented 1 year ago

@sandersdan, could you look at WPT https://github.com/web-platform-tests/wpt/pull/40691 ?

sandersdan commented 1 year ago

@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.