Updated on 2024-07-30 GMT+08:00

Enabling or Disabling Audio Streams

Function

This API is used to enable or disable audio streams.

Function Prototype

setAudioRawDataOutputConfig(audioRawDataConfigInfo: AudioRawDataConfigInfo, onSetAudioRawDataOutputConfigResult?: (ret: SDKERR, reason: string) => void): voidsetAudioRawDataOutputConfig(audioRawDataConfigInfo: AudioRawDataConfigInfo, onSetAudioRawDataOutputConfigResult?: (ret: SDKERR, reason: string) => void): void

Request Parameters

Table 1 Input parameter description
Parameter Mandatory Type Description
audioRawDataConfigInfo Yes AudioRawDataConfigInfo Audio stream configuration.
onSetAudioRawDataOutputConfigResult Yes (ret: SDKERR, reason: string) => void Callback of enabling or disabling audio streams.
Table 2 AudioRawDataConfigInfo
Parameter Mandatory Type Description
isOpen Yes boolean Whether audio streams are enabled.

Return Values

void

Callback Method Parameters

(ret: SDKERR, reason: string) => void

Table 3 Input parameter description
Parameter Type Description
ret For details about SDKERR, see Error Code Reference. Error code.
reason string Error description.