-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Here are two fragments of WebCodecs WebIDL:
dictionary AudioDecoderConfig {
required DOMString codec;
[EnforceRange] required unsigned long sampleRate;
[EnforceRange] required unsigned long numberOfChannels;
BufferSource description;
};
and
dictionary AudioDecoderConfig {
required DOMString codec;
required [EnforceRange] unsigned long sampleRate;
required [EnforceRange] unsigned long numberOfChannels;
BufferSource description;
};
The former is incorrect per spec, and the latter is the correct way to do this. Chromium's parser accepts the correct syntax (https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/renderer/modules/webcodecs/audio_decoder_config.idl;l=10-22?q=audiodecoderconfig&ss=chromium&start=11 is what they have in tree). Similarly, Firefox's WebIDL parser only accepts the correct syntax.
widlparser
only seem to accept the syntax of the former example, and this is what we have in the spec today, but we'd like to merge w3c/webcodecs#488 to align with actual implementations.
Metadata
Metadata
Assignees
Labels
No labels