setDefaultAudioRoute method
@detail api @author dixing @brief Set the speaker or earpiece as the default audio playback device. @param route Audio playback device. Refer to AudioRoute{@link #AudioRoute}. You can only use earpiece and speakerphone. @return - 0: Success. - < 0: failure. It fails when the device designated is neither a speaker nor an earpiece. @note For the default audio route switching strategy of the RTC SDK, see Set the Audio Route.
Implementation
FutureOr<int> setDefaultAudioRoute(AudioRoute route) async {
return await nativeCall('setDefaultAudioRoute', [route.$value]);
}