Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sounds for my javascript game with pure js?

Is it possible to play a sound in my javascript game without using anything like flash or a HTML workaround?

When I searched google it gave me various plugins or ways of doing it with flash, but I'd like to do it with pure js, while being able to play many sounds parallel.

like image 473
Wingblade Avatar asked May 15 '12 18:05

Wingblade


1 Answers

The HTML5 <audio> element has fairly decent support, and there's also an audio API (which allows advanced audio manipulation) lagging somewhat behind.

There's even a tutorial on using it in a JS game.

like image 197
josh3736 Avatar answered Sep 19 '22 02:09

josh3736