onMixedVideoFrame$withTaskId method

FutureOr<void> onMixedVideoFrame$withTaskId(
  1. dynamic videoFrame,
  2. dynamic taskId
)
override

@hidden for internal use only @detail callback @author liujingchao @brief Callback with video data in YUV after intelligent stream mixing. @param videoFrame Video data frame in YUV, see ByteRTCVideoFrame{@link #ByteRTCVideoFrame}. @param taskId Task ID. @note The interval between callbacks is the same with that between video frames.

Implementation

FutureOr<void> onMixedVideoFrame$withTaskId(
    dynamic videoFrame, dynamic taskId) async {
  if ($instance == null || $instance is! IClientMixedStreamObserver) {
    return;
  }
  return ($instance as IClientMixedStreamObserver)
      .onMixedVideoFrame
      ?.call(taskId.toString(), packObject(videoFrame, () => IVideoFrame()));
}