rtcEngine$onExternalScreenFrameUpdate method

FutureOr<void> rtcEngine$onExternalScreenFrameUpdate(
  1. dynamic engine,
  2. dynamic frameUpdateInfo
)
override

@hidden @detail callback @author zhoubohui @brief After calling setOriginalScreenVideoInfo:withOriginalCaptureHeight: to set the original width and height of the external shared-screen stream and setting the encoding mode to the automatic mode, you will receive this callback to re-capture the stream based on the recommended pixel and framerate by RTC. @param engine ByteRTCEngine object @param frameUpdateInfo The recommended pixel and framerate by RTC. See ByteRTCFrameUpdateInfo{@link #ByteRTCFrameUpdateInfo}.

Implementation

FutureOr<void> rtcEngine$onExternalScreenFrameUpdate(
    dynamic engine, dynamic frameUpdateInfo) async {
  if ($instance == null || $instance is! IRTCEngineEventHandler) {
    return;
  }
  return ($instance as IRTCEngineEventHandler)
      .onExternalScreenFrameUpdate
      ?.call(
          packObject(
              engine,
              () => FrameUpdateInfo.fromMap(
                  FrameUpdateInfo.deepPackedMapValues(
                      FrameUpdateInfo.mapMemberToConstructorParams(engine)))),
          packObject(
              frameUpdateInfo,
              () => FrameUpdateInfo.fromMap(
                  FrameUpdateInfo.deepPackedMapValues(
                      FrameUpdateInfo.mapMemberToConstructorParams(
                          frameUpdateInfo)))));
}