Interface CustomAudioTrackInitConfig

Configurations for the custom audio track. Set these configurations when calling [AgoraRTC.createCustomAudioTrack]IAgoraRTC.createCustomAudioTrack.

interface CustomAudioTrackInitConfig {
    encoderConfig?: AudioEncoderConfiguration | "speech_low_quality" | "speech_standard" | "music_standard" | "standard_stereo" | "high_quality" | "high_quality_stereo";
    mediaStreamTrack: MediaStreamTrack;
}

Properties

encoderConfig?: AudioEncoderConfiguration | "speech_low_quality" | "speech_standard" | "music_standard" | "standard_stereo" | "high_quality" | "high_quality_stereo"

The audio encoder configurations.

You can set the audio encoder configurations in either of the following ways:

  • Pass the preset audio encoder configurations by using [[AudioEncoderConfigurationPreset]].
  • Pass your customized audio encoder configurations by using [[AudioEncoderConfiguration]].

Firefox does not support setting the audio encoding rate.

mediaStreamTrack: MediaStreamTrack

Your MediaStreamTrack object.