You configure an AudioDecoder by calling its configure() method and passing it a configuration object . This method enqueues a control message to set up the decoder for processing audio chunks .
For a practical example, you can configure the decoder for the Opus codec by passing the codec, sample rate, and channel count:
audioDecoder.configure({
codec: "opus",
sampleRate: 44100,
numberOfChannels: 2,
});This example comes from the "AudioDecoder: configure() method" reference page . The configure() method is listed as an instance method in the main AudioDecoder interface documentation .