KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Is it possible to add event listeners to web audio api sounds? I've been looking for an event or trigger for when a sounds completes but can't find anything. Here is how I imagine it would work: soundSource = context.createBufferSource(); soundBuffer = context.createBuffer(audioData, true); soundSource.buffer = soundBuffer; soundSource.connect(volumeNode); soundSource.addEventListener('ended', function(e){ console.log("ended", "", e); }, false); soundSource.noteOn(context.currentTime);
Tags (comma-separated)
Save Edits
Cancel