numberOfChannels/sampleRate check in AudioDecoderConfig/AudioEncoderConfig
Nobody has claimed this yet.
- Dominant language
- HTML
- Stars
- 1.3k
- Forks
- 194
- Avg merge
- 1d 13h
- Merged PRs (30d)
- 3
Description
Right now a valid AudioEncoderConfig needs to have a numberOfChannels and a sampleRate property greater than zero.
https://w3c.github.io/webcodecs/#valid-audioencoderconfig
A similar check does not exist to validate an AudioDecoderConfig.
https://w3c.github.io/webcodecs/#valid-audiodecoderconfig
Chrome seems to perform the same non-zero checks for an AudioEncoderConfig and AudioDecoderConfig. But as far as I can tell they are not covered by a WPT.
The checks for an AudioEncoderConfig were added here: https://github.com/w3c/webcodecs/pull/780.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the valid-audiodecoderconfig specification and compare it with the existing AudioEncoderConfig checks. Add WPT coverage for zero or missing numberOfChannels and sampleRate in AudioDecoderConfig, and verify that the resulting behavior matches the stated validation requirements.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- api, testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100