API Reference for web - Interface: AudioEncoderConfiguration

更新时间: 2023-10-23 16:45:52

# Interface: AudioEncoderConfiguration

interface/StreamInterface.AudioEncoderConfiguration

定义音频编码配置的对象。

用于创建音频流时指定自定义的编码配置。

你可以在 CoreRTC.createCustomAudioTrack, CoreRTC.createMicrophoneAudioTrackCoreRTC.createBufferSourceAudioTrack 方法中传入该配置对象来自定义本地音频的编码配置。

# Properties

# bitrate

bitrate: undefined | number

音频码率,单位为 Kbps。


# sampleRate

sampleRate: undefined | number

音频采样率,单位为 Hz。


# sampleSize

sampleSize: undefined | number

音频采样大小。


# stereo

stereo: undefined | boolean

是否开启立体声。