encode

fun encode(frame: VideoFrame, options: VideoEncoderEncodeOptions = definedExternally)(source)

The encode() method of the VideoEncoder interface asynchronously encodes a VideoFrame.

MDN Reference