close

fun close()(source)

The close() method of the VideoEncoder interface ends all pending work and releases system resources.

MDN Reference