onRemoteEncodedVideoFrame method

FutureOr<void> onRemoteEncodedVideoFrame(
  1. dynamic streamId,
  2. dynamic streamInfo,
  3. dynamic encodedVideoFrame
)
override

@detail callback @author wangzhanqiang @brief Call registerRemoteEncodedVideoFrameObserver{@link #RTCEngine#registerRemoteEncodedVideoFrameObserver}, the callback is triggered when the SDK detects the remote encoded video data @param streamId The ID of the received remote stream @param streamInfo The information of the received remote stream. See StreamInfo{@link #StreamInfo} @param encodedVideoFrame Received remote video frame information. See RTCEncodedVideoFrame{@link #RTCEncodedVideoFrame} @note encodedVideoFrame is only valid within the scope of the callback function. Do not store this parameter and access the memory data of this parameter in other functions

Implementation

FutureOr<void> onRemoteEncodedVideoFrame(
    dynamic streamId, dynamic streamInfo, dynamic encodedVideoFrame) async {
  if ($instance == null || $instance is! IRemoteEncodedVideoFrameObserver) {
    return;
  }
  return ($instance as IRemoteEncodedVideoFrameObserver)
      .onRemoteEncodedVideoFrame
      ?.call(streamId.toString());
}