onFrame

abstract fun onFrame(callId: String, frame: VideoFrame)

Called when a new frame is received from the remote stream.

Frames are in YUV I420 planar or semi-planar (not fully interleaved) format. Strides and plane pointers must be respected — do not assume a packed layout.

This callback blocks rendering. In-place modification of the provided frame will be reflected in the rendered output. For operations that do not affect rendering (e.g. saving a JPEG snapshot), copy the frame and process it on a separate thread.

Parameters

callId

The id of the call the frame is coming from.

frame

The YUV I420 frame. Strides and plane pointers must be respected.

See also