setDefaultAudioRoute method
@hidden(macOS) @detail api @author yezijian.me @brief Set the speaker or earpiece as the default audio playback device. @param audioRoute Audio playback device. Refer to ByteRTCAudioRoute{@link #ByteRTCAudioRoute}. 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(ByteRTCAudioRoute audioRoute) async {
return await nativeCall('setDefaultAudioRoute:', [audioRoute.$value]);
}