Firefox Tomorrow

web api interface

AudioEncoder

View on MDN ↗

Secure contextAvailable in workers

The AudioEncoder interface of the WebCodecs API encodes AudioData objects.

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()
    • : Enqueues a control message to configure the audio encoder for encoding chunks.
  • encode()
    • : Enqueues a control message to encode a given AudioData objects.
  • flush()
    • : Returns a promise that resolves once all pending messages in the queue have been completed.
  • reset()
    • : Resets all states including configuration, control messages in the control message queue, and all pending 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.