setAudioProfile method
Sets the audio parameters and application scenarios.
Note
- You must call this method before calling the joinChannel method. See RtcEngine.joinChannel
- In the Communication and ChannelProfile.LiveBroadcasting profiles, the bitrates may be different from your settings due to network self-adaptation.
- In scenarios requiring high-quality audio, we recommend setting profile as AudioScenario.ShowRoom and scenario as AudioScenario.GameStreaming. For example, for music education scenarios.
Parameter profile
Sets the sample rate, bitrate, encoding mode, and the number of channels. See AudioProfile.
Parameter scenario
Sets the audio application scenarios. Under different audio scenarios, the device uses different volume tracks, i.e. either the in-call volume or the media volume. See AudioScenario.
Implementation
@override
Future<void> setAudioProfile(AudioProfile profile, AudioScenario scenario) {
return _invokeMethod('setAudioProfile', {
'profile': AudioProfileConverter(profile).value(),
'scenario': AudioScenarioConverter(scenario).value()
});
}