siggy / beatboxer

Drum machine in a few hundred lines of html/js/css

Home Page:https://sig.gy/beatboxer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

no audio

simbalion opened this issue · comments

commented

I'm using Firefox on Debian Jessie, and I don't get any audio from your app.
I think it might be a problem with my system, as I've had issues with audio in limited places before, but mostly it works. I was hoping you might be able to tell me what the requirements are for audio to work with your app, and then perhaps I could solve this problem I have.

Hi @simbalion, appreciate the report. It's quite possible it's an issue with beatboxer, particularly if your system can play audio from other websites.

The APIs we're using to play sound are:
new(window.AudioContext || window.webkitAudioContext)()
..and if that fails fallback to:
new Audio(sounds[i]).play();

I'm learning that some audio APIs fare better than others with compatibility.

Some folks have recommended other audio APIs/libs, you may want to experiment with some:
http://www.w3schools.com/html/html5_audio.asp
https://howlerjs.com/

I'll keep iterating on my side as well. I may spin up a VM to try to repro your environment.