Bug 125031
| Summary: | No audioprocess event or byte frequency data when using HTML5 audio via createMediaElementSource() | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Scott Schiller <bugs> |
| Component: | Web Audio | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | cheron.leo, crogers, cwilso, jer.noble, lepinski, mail, t.decaux, ultravistor, webkitbugzilla |
| Priority: | P2 | ||
| Version: | 528+ (Nightly build) | ||
| Hardware: | Mac | ||
| OS: | OS X 10.9 | ||
Scott Schiller
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
http://isflashdeadyet.com/tests/web-audio-visualization/
Demo 2: AudioContext() + createMediaElementSource() + createAnalyser() / getByteFrequencyData() method
http://isflashdeadyet.com/tests/web-audio-visualization/index-analyser.html
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Takahiro Ichihashi
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:
https://developer.apple.com/library/safari/documentation/audiovideo/conceptual/using_html5_audio_video/PlayingandSynthesizingSounds/PlayingandSynthesizingSounds.html
MDN:
https://developer.mozilla.org/ja/docs/Web/API/AudioContext.createMediaElementSource
Takahiro Ichihashi
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.
tommy tee
It would be awesome if this worked.
I hope someone up there gets the time to look into it.
Thanks
Chris Wilson
I believe this is essentially the same as http://crbug.com/419446.
Jer Noble
Dup of bug #135042.
*** This bug has been marked as a duplicate of bug 135042 ***
Jer Noble
Please try this against a WebKit nightly build on Mac OS X Yosemite.
Thomas Decaux
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".