rtcEngine$onLocalProxyStateChanged$withProxyState$withProxyError method
FutureOr<void>
rtcEngine$onLocalProxyStateChanged$withProxyState$withProxyError(
- dynamic engine,
- dynamic type,
- dynamic state,
- dynamic error,
override
@detail callback @author keshixing.rtc @brief Callback on local proxy connection. After calling setLocalProxy:{@link #ByteRTCEngine#setLocalProxy} to set local proxies, you will receive this callback that informs you of the states of local proxy connection. @param engine ByteRTCEngine object @param type The types of local proxies. Refer to ByteRTCLocalProxyType{@link #ByteRTCLocalProxyType} for details. @param state The states of local proxy connection. Refer to ByteRTCLocalProxyState{@link #ByteRTCLocalProxyState} for details. @param error The errors of local proxy connection. Refer to ByteRTCLocalProxyError{@link #ByteRTCLocalProxyError} for details.
Implementation
FutureOr<void>
rtcEngine$onLocalProxyStateChanged$withProxyState$withProxyError(
dynamic engine, dynamic type, dynamic state, dynamic error) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler).onLocalProxyStateChanged?.call(
t_LocalProxyType.ios_to_code($p_i.ByteRTCLocalProxyType.values
.firstWhere((t) => t.$value == type || t.name == type)),
t_LocalProxyState.ios_to_code($p_i.ByteRTCLocalProxyState.values
.firstWhere((t) => t.$value == state || t.name == state)),
t_LocalProxyError.ios_to_code($p_i.ByteRTCLocalProxyError.values
.firstWhere((t) => t.$value == error || t.name == error)));
}