Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. Web APIs
  3. AudioEncoder
  4. encode()

AudioEncoder: encode() method

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Secure context: This feature is available only insecure contexts (HTTPS), in some or allsupporting browsers.

Note: This feature is available inDedicated Web Workers.

Theencode() method of theAudioEncoder interface enqueues a control message to encode a givenAudioData object.

Syntax

js
encode(data)

Parameters

data

AnAudioData object.

Return value

None (undefined).

Exceptions

InvalidStateErrorDOMException

Thrown if thestate is not"configured".

TypeError

Thrown if theAudioData object has beentransferred.

Examples

In the following exampleencode is passed anAudioData object.

js
encoder.encode(data);

Specifications

Specification
WebCodecs
# dom-audioencoder-encode

Browser compatibility

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp