onMixedStreamEvent method
@valid since 3.60. Since version 3.60, this callback replaces the onStreamMixingEvent and onPushPublicStreamResult 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.
@detail callback
@author lizheng
@brief Reports events during pushing a mixed stream to CDN or a WTN stream.
@param info Task details, see MixedStreamTaskInfo{@link #MixedStreamTaskInfo}
@param event Stream mixing and pushing status, see MixedStreamTaskEvent{@link #MixedStreamTaskEvent}
@param error Errors occurring during the pushing process. See MixedStreamTaskErrorCode{@link #MixedStreamTaskErrorCode}
Implementation
FutureOr<void> onMixedStreamEvent(
dynamic info, dynamic event, dynamic error) async {
if ($instance == null || $instance is! IRTCEngineEventHandler) {
return;
}
return ($instance as IRTCEngineEventHandler).onMixedStreamEvent?.call(
packObject(info, () => MixedStreamTaskInfo()),
t_MixedStreamTaskEvent.android_to_code($p_a.MixedStreamTaskEvent.values
.firstWhere((t) => t.$value == event || t.name == event)),
t_MixedStreamTaskErrorCode.android_to_code($p_a
.MixedStreamTaskErrorCode.values
.firstWhere((t) => t.$value == error || t.name == error)));
}