onLocalEncodedVideoFrame method

FutureOr<void> onLocalEncodedVideoFrame(
  1. dynamic videoSource,
  2. dynamic encodedVideoFrame
)
override

@detail callback @brief 调用 registerLocalEncodedVideoFrameObserver{@link #RTCEngine#registerLocalEncodedVideoFrameObserver} 后,SDK 每次使用内部采集,采集到一帧视频帧,或收到一帧外部视频帧时,都会回调该事件。 @param videoSource 预留参数 @param encodedVideoFrame 本地视频帧信息,参看 RTCEncodedVideoFrame{@link #RTCEncodedVideoFrame} @note encodedVideoFrame 只在回调函数作用域内有效,不要存储该参数并在其它函数内访问该参数的内存数据

Implementation

FutureOr<void> onLocalEncodedVideoFrame(
    dynamic videoSource, dynamic encodedVideoFrame) async {
  if ($instance == null || $instance is! ILocalEncodedVideoFrameObserver) {
    return;
  }
  return ($instance as ILocalEncodedVideoFrameObserver)
      .onLocalEncodedVideoFrame
      ?.call(videoSource);
}