encode method

void encode(
  1. VideoFrame frame, [
  2. VideoEncoderEncodeOptions options
])

@AvailableInWorkers("window_and_dedicated")

The encode() method of the VideoEncoder interface asynchronously encodes a VideoFrame. Encoded data (EncodedVideoChunk) or an error will eventually be returned via the callbacks provided to the VideoEncoder constructor.

Implementation

external void encode(
  VideoFrame frame, [
  VideoEncoderEncodeOptions options,
]);