rtcRoom$onRoomWarning method
@hidden
@deprecated since 3.45 and will be deleted in 3.51, use rtcRoom:onRoomStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onRoomStateChanged:withUid:state:extraInfo} and rtcRoom:onStreamStateChanged:withUid:state:extraInfo:{@link #ByteRTCRoomDelegate#rtcRoom:onStreamStateChanged:withUid:state:extraInfo} instead.
@detail callback
@author shenpengliang
@brief Warning callback occurred.
A warning occurred during the SDK runtime. The SDK usually recovers automatically and warnings can be ignored.
@param rtcRoom ByteRTCRoom object.
@param warningCode Warning code. See enumeration type ByteRTCWarningCode{@link #ByteRTCWarningCode}.
Implementation
FutureOr<void> rtcRoom$onRoomWarning(
dynamic rtcRoom, dynamic warningCode) async {
if ($instance == null || $instance is! IRTCRoomEventHandler) {
return;
}
return ($instance as IRTCRoomEventHandler).onRoomWarning?.call(
packObject(rtcRoom, () => RTCRoom()),
t_WarningCode.ios_to_code($p_i.ByteRTCWarningCode.values.firstWhere(
(t) => t.$value == warningCode || t.name == warningCode)));
}