MediaElementAudioSourceNode class

The interface represents an audio source consisting of an HTML5 <audio> or <video> element. It is an AudioNode that acts as an audio source. A MediaElementSourceNode has no inputs and exactly one output, and is created using the AudioContext.createMediaElementSource() method. The amount 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

Number of inputs 0

Number of outputs 1

Channel count

defined by the media in the [HTMLMediaElement]
passed to the
[AudioContext.createMediaElementSource]
method that created it.
Implemented types
Available extensions
Annotations
  • @JS()
  • @staticInterop

Properties

channelCount int

Available on AudioNode, provided by the PropsAudioNode extension

getter/setter pair
channelCountMode ChannelCountMode

Available on AudioNode, provided by the PropsAudioNode extension

getter/setter pair
channelInterpretation ChannelInterpretation

Available on AudioNode, provided by the PropsAudioNode extension

getter/setter pair
context BaseAudioContext

Available on AudioNode, provided by the PropsAudioNode extension

no setter
hashCode int
The hash code for this object.
no setterinherited
mediaElement HTMLMediaElement

Available on MediaElementAudioSourceNode, provided by the PropsMediaElementAudioSourceNode extension

no setter
numberOfInputs int

Available on AudioNode, provided by the PropsAudioNode extension

no setter
numberOfOutputs int

Available on AudioNode, provided by the PropsAudioNode extension

no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

connect(AudioNode destinationNode, [int? output = 0, int? input = 0]) AudioNode

Available on AudioNode, provided by the PropsAudioNode extension

disconnect([AudioNode? destinationNode, int? output, int? input]) → void

Available on AudioNode, provided by the PropsAudioNode extension

dispatchEvent(Event event) bool

Available on EventTarget, provided by the PropsEventTarget extension

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeEventListener(String type, EventListener? callback, [dynamic options]) → void

Available on EventTarget, provided by the PropsEventTarget extension

toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited