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