w3c / w3c/webcodecs

Valid `AudioEncoderConfig` algorithm for unsupported codecs with codec-specific steps

Open
#927 0 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

The algorithm that checks whether an object is a valid AudioEncoderConfig asks user agents to run possible codec-specific validation steps defined in the registrations listed in the registry. That seems wrong:

  1. User agents can choose the codecs they support, it seems strange to ask them to implement validation steps for codecs they chose not to support. For example, when an application calls configure() with an invalid config for a codec that is not supported by a user agent (either because the user agent decided not to support it or because the codec was added to the registry recently), the spec still requires that the user agent know about any codec-specific extension, run possible validation steps defined in the underlying registration document, and throw a TypeError if the configuration is invalid. How can the user agent know anything about a codec it does not (want to) know anything about?
  2. A registry is meant to be completed over time, even when it's stable. That's its purpose. Normative algorithms cannot set requirements over such a moving target (also see Specifications that reference registries in the W3C Process). If we expect user agents to implement extra validation steps, they should be integrated into the WebCodecs specification itself.

(Noting #861 and #826 as open issues somewhat related to this)

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 with the valid AudioEncoderConfig algorithm and the configure() processing steps, then review the codec registry requirements and related issues #861 and #826. Determine how the specification should handle codec-specific validation for unsupported codecs; the issue is done when the normative behavior is resolved and clearly reflected in the WebCodecs specification.

Written by the indexing model from the issue text.

Assessment

Tech stack
html
Domain
audio-video-rtc, documentation
Issue type
Bug
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.