onCaptureVideoFrame property

void Function(VideoSourceType sourceType, VideoFrame videoFrame)? onCaptureVideoFrame
final

Gets the video data captured by the local device.

You can get the raw video data captured by the local device in the callback. If the video data you get is of RGBA type, the SDK does not support processing the Alpha channel. It is recommended that you ensure the modified parameters in videoFrame match the actual video frame in the buffer; otherwise, unexpected rotation, distortion, etc., may occur in the local preview or remote video. Due to framework limitations, this callback does not support sending the processed video data back to the SDK.

  • sourceType Type of video source, which may include camera, screen, or media player. See VideoSourceType.
  • videoFrame Video frame data. See VideoFrame. The default format of the video frame data obtained through this callback is as follows: Android: I420 iOS: I420 macOS: I420 Windows: YUV420

Implementation

final void Function(VideoSourceType sourceType, VideoFrame videoFrame)?
    onCaptureVideoFrame;