Skip to content

AudioDecoder.configure should not throw for invalid config #861

Open
@jyavenard

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
web-platform-tests/wpt#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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions