Firefox Tomorrow

web api interface

MediaElementAudioSourceNode

View on MDN ↗

The MediaElementAudioSourceNode interface represents an audio source consisting of an HTML <audio> or <video> element. It is an AudioNode that acts as an audio source.

A MediaElementAudioSourceNode has no inputs and exactly one output, and is created using the createMediaElementSource() method. The number of channels in the output equals the number of channels of the audio referenced by the HTMLMediaElement used in the creation of the node, or is 1 if the HTMLMediaElement has no audio.

Number of inputs 0
Number of outputs 1
Channel count 2 (but note that [`channelCount`](/firefox/mdn/api/audionode/channelcount/) is only used for up-mixing and down-mixing [`AudioNode`](/firefox/mdn/api/audionode/) inputs, and MediaElementAudioSourceNode doesn't have any input)

Constructor

Instance properties

Inherits properties from its parent, AudioNode.

Instance methods

Inherits methods from its parent, AudioNode.

Example

See AudioContext.createMediaElementSource() for example code.

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also