w3c / w3c/webcodecs

AudioDecoder.configure should not throw for invalid config

Open
#861 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
1.3k
Forks
194
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Per spec https://w3c.github.io/webcodecs/#dom-audiodecoder-configure

"If config is not a valid AudioDecoderConfig, throw a TypeError."

I think this is ambiguous, and there's even inconsistency in the tests where in one place we check that the config isn't valid and in the other that the same config is also not supported (I lodged
https://github.com/web-platform-tests/wpt/issues/49636 for this one)

Rather than throwing when a configuration isn't valid, we should just mark it as not supported; particularly when there's a lot of discrepancies already in what is considered a "valid" configuration (WPT checks that bitrate isn't 0, or too big, that the Opus description is greater than 9 bytes etc) which aren't in the spec and doesn't have broad acceptance across UAs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the AudioDecoder.configure behavior described in the WebCodecs specification and compare the validity and support checks in the relevant Web Platform Tests. Resolve whether invalid configurations should be treated as unsupported rather than throwing, then update the implementation and tests so the chosen behavior is consistent with the specification and WPT expectations.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
api
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.