setAudioScenario method

FutureOr<int> setAudioScenario(
  1. AudioScenarioType audioScenario
)

@hidden(macOS,Windows,Linux) @valid since 3.60. @detail api @author gongzhengduo @brief Sets the audio scenarios.
After selecting the audio scenario, SDK will automatically switch to the proper volume modes (the call/media volume) according to the scenarios and the best audio configurations under such scenarios.
This API should not be used at the same time with the old one. @param audioScenario Audio scenarios. See AudioScenarioType{@link #AudioScenarioType}. @return - 0: Success. - < 0 : Fail. See ReturnStatus{@link #ReturnStatus} for more details @note - You can use this API both before and after joining the room. - Call volume is more suitable for calls, meetings and other scenarios that demand information accuracy. Call volume will activate the system hardware signal processor, making the sound clearer. The volume cannot be reduced to 0. - Media volume is more suitable for entertainment scenarios, which require musical expression. The volume can be reduced to 0.

Implementation

FutureOr<int> setAudioScenario(AudioScenarioType audioScenario) async {
  return await nativeCall('setAudioScenario', [audioScenario.$value]);
}