Firefox Tomorrow

web api interface

VideoEncoder

View on MDN ↗

Secure contextAvailable in workers

The VideoEncoder interface of the WebCodecs API encodes VideoFrame objects into EncodedVideoChunks.

Constructor

Instance properties

Inherits properties from its parent, EventTarget.

  • encodeQueueSize Read only
    • : An integer representing the number of encode queue requests.
  • state Read only
    • : Represents the state of the underlying codec and whether it is configured for encoding.

Events

Static methods

Instance methods

Inherits methods from its parent, EventTarget.

  • configure()
    • : Asynchronously prepares the encoder to accept video frames for encoding with the specified parameters.
  • encode()
  • flush()
    • : Returns a promise that resolves once all pending encodes have been completed.
  • reset()
    • : Cancels all pending encodes and callbacks.
  • close()
    • : Ends all pending work and releases system resources.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also

Video processing with WebCodecs