siggy / beatboxer

Drum machine in a few hundred lines of html/js/css
https://sig.gy/beatboxer/
MIT License
329 stars 40 forks source link

no audio #10

Open simbalion opened 8 years ago

simbalion commented 8 years ago

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.

siggy commented 8 years ago

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.