Skip to content
Function

canDecodeAudio

ts
canDecodeAudio(
	codec: AudioCodec,
	options: SetOptional<AudioDecoderConfig, 'codec' | 'numberOfChannels' | 'sampleRate'> = {},
): Promise<boolean>;

Checks if the browser is able to decode the given audio codec with the given parameters.

See AudioCodec and SetOptional.

Released under the Mozilla Public License 2.0.