createMediaElementSource
Summary
Creates a MediaElementAudioSourceNode, given an HTMLMediaElement. As a consequence of calling this method, audio playback from the HTMLMediaElement will be re-routed into the processing graph of the AudioContext.
Method of apis/webaudio/AudioContextapis/webaudio/AudioContext
Syntax
var = AudioContext.createMediaElementSource();
Return Value
Returns an object of type
MediaElementAudioSourceNode
Examples
var audioCtx = new AudioContext();
var source = audioCtx.createMediaElementSource(myMediaElement);
Related specifications
- W3C Web Audio API
- W3C Editor’s Draft