Get to know MDN better
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
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 AudioContext.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.
EventTarget AudioNode MediaElementAudioSourceNode| 0 |
| 1 |
| 2 (but note that AudioNode.channelCount is only used for up-mixing and down-mixing AudioNode inputs, and MediaElementAudioSourceNode doesn't have any input) |
Creates a new MediaElementAudioSourceNode object instance.
Inherits properties from its parent, AudioNode.
mediaElement Read onlyThe HTMLMediaElement used when constructing this MediaStreamAudioSourceNode.
Inherits methods from its parent, AudioNode.
See AudioContext.createMediaElementSource() for example code.
| Web Audio API # MediaElementAudioSourceNode |
Enable JavaScript to view this browser compatibility table.
This page was last modified on Jul 24, 2024 by MDN contributors.
Your blueprint for a better internet.
Visit Mozilla Corporation’s not-for-profit parent, the Mozilla Foundation.
Portions of this content are ©1998–2026 by individual mozilla.org contributors. Content available under a Creative Commons license.