setAudioScenario abstract method

Future<void> setAudioScenario(
  1. AudioScenarioType scenario
)

Sets audio scenarios.

Due to iOS system restrictions, some audio routes cannot be recognized in call volume mode. Therefore, if you need to use an external sound card, it is recommended to set the audio scenario to audioScenarioGameStreaming (3). In this scenario, the SDK will switch to media volume to avoid this issue. You can call this method either before or after joining a channel.

  • scenario The audio scenarios. Under different audio scenarios, the device uses different volume types. See AudioScenarioType.

Returns When the method call succeeds, there is no return value; when fails, the AgoraRtcException exception is thrown. You need to catch the exception and handle it accordingly.

Implementation

Future<void> setAudioScenario(AudioScenarioType scenario);