rtcEngine$onMixedStreamEvent$withMixedStreamInfo$withErrorCode method

FutureOr<void> rtcEngine$onMixedStreamEvent$withMixedStreamInfo$withErrorCode(
  1. dynamic engine,
  2. dynamic event,
  3. dynamic info,
  4. dynamic errorCode,
)
override

@valid since 3.60. Since version 3.60, this callback replaces the onStreamMixingEvent:taskId:error:mixType: and rtcEngine:onPushPublicStreamResult:publicStreamId:errorCode: methods for the functions described below. If you have upgraded to version 3.60 or later and are still using these methods, please migrate to this callback. @hidden(Linux) @detail callback @author lizheng @brief Reports events during pushing a mixed stream to CDN or a WTN stream. @param engine ByteRTCEngine object. @param event Stream mixing and pushing status, see ByteRTCMixedStreamTaskEvent{@link #ByteRTCMixedStreamTaskEvent}. @param info Task details, see ByteRTCMixedStreamTaskInfo{@link #ByteRTCMixedStreamTaskInfo}. @param errorCode Errors occurring during the pushing process. See ByteRTCMixedStreamTaskErrorCode{@link #ByteRTCMixedStreamTaskErrorCode}. @order 0

Implementation

FutureOr<void> rtcEngine$onMixedStreamEvent$withMixedStreamInfo$withErrorCode(
    dynamic engine, dynamic event, dynamic info, dynamic errorCode) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler).onMixedStreamEvent?.call(
      packObject(info, () => MixedStreamTaskInfo()),
      t_MixedStreamTaskEvent.ios_to_code($p_i
          .ByteRTCMixedStreamTaskEvent.values
          .firstWhere((t) => t.$value == event || t.name == event)),
      t_MixedStreamTaskErrorCode.ios_to_code($p_i
          .ByteRTCMixedStreamTaskErrorCode.values
          .firstWhere((t) => t.$value == errorCode || t.name == errorCode)));
}