io.agora.rtc

## Interface IVideoFrameObserver2

-     public interface IVideoFrameObserver2

  Observer interface for video frame events (V2).

- - ### Method Summary

    All Methods Instance Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `default void` | `onFrame(AgoraVideoFrameObserver2 agoraVideoFrameObserver2, java.lang.String channelId, java.lang.String remoteUserId, VideoFrame frame)` Note: To improve data transmission efficiency, the buffer of the frame object is a DirectByteBuffer.

- - ### Method Detail

    - #### onFrame

          default void onFrame(AgoraVideoFrameObserver2 agoraVideoFrameObserver2,
                               java.lang.String channelId,
                               java.lang.String remoteUserId,
                               VideoFrame frame)

      Note: To improve data transmission efficiency, the buffer of the frame object is a DirectByteBuffer. Be sure to extract the byte array value in the callback synchronously and then transfer it to the asynchronous thread for processing. You can refer to `Utils.getBytes(ByteBuffer)`.
      Parameters:
        `agoraVideoFrameObserver2` - the video frame observer
        `channelId` - the channel id
        `remoteUserId` - the remote user id
        `frame` - the video frame