Bug 125031 - No audioprocess event or byte frequency data when using HTML5 audio via createMediaElementSource()
Summary: No audioprocess event or byte frequency data when using HTML5 audio via creat...
Status: RESOLVED DUPLICATE of bug 135042
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.9
: P2 Normal
Assignee: Nobody
Depends on:
Reported: 2013-11-30 11:44 PST by Scott Schiller
Modified: 2018-10-02 13:42 PDT (History)
9 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Scott Schiller 2013-11-30 11:44:28 PST
Purpose: Attempting to use Web Audio API to get data for visualization during playback of an HTML5 <audio> element.

Observed: 'audioprocess' event does not fire (demo 1), getByteFrequencyData() returns array of zeroes (demo 2.)

Demo 1: AudioContext() + createMediaElementSource() + createScriptProcessor() → audioprocess event

Demo 2: AudioContext() + createMediaElementSource() + createAnalyser() / getByteFrequencyData() method
Comment 1 Takahiro Ichihashi 2014-10-04 09:50:44 PDT
It seems that createMediaElementSource() is actually not implemented (correct me if wrong). The method is there; we can call it w/o error, but it doesn't filter/analyze/produce actual sound if the audio is routed through this node. (Sounds come from media element even the method is not working, which makes it error-prone)

would love to hear the plan. 

* Btw many documentations (including apple dev guide) mention it as usable function, 

Dev guide:

Comment 2 Takahiro Ichihashi 2014-11-09 07:11:51 PST
Hello, is anyone paying attention to this issue? 

As a user/developer, use case of createMediaElementSource() was clear: visualise audio data (in iOS Safari). Since it's not working now, the application needs to download all the audio file first and execute decodeAudioData(), or cache spectrum data per audio file. Both appears not to be so smart/straightforward approach.
Comment 3 tommy tee 2014-12-17 17:11:13 PST
It would be awesome if this worked.
I hope someone up there gets the time to look into it.

Comment 4 Chris Wilson 2014-12-18 12:35:18 PST
I believe this is essentially the same as http://crbug.com/419446.
Comment 5 Jer Noble 2015-04-02 15:16:50 PDT
Dup of bug #135042.

*** This bug has been marked as a duplicate of bug 135042 ***
Comment 6 Jer Noble 2015-04-02 15:18:10 PDT
Please try this against a WebKit nightly build on Mac OS X Yosemite.
Comment 7 Thomas Decaux 2018-10-02 13:42:25 PDT
It seems Safari 12 is still not working with the simple demo:

"analyzer is not working with MediaElementAudioSourceNode, but it's working fine with AudioBufferSourceNode".