Sound tag on an Android device

This thread talks about the audio library on Android, but I'm not sure what the output is as of August 2011.

Here I have jQuery mobile. This works on my iPod touch, but not on my Android device:

<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.js"></script> <script src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script> ... <a href="JavaScript:;" data-role="button" id="doink">Doink!</a> ... <audio id="doink-wav" src="doink.wav" preload="auto"></audio> <script src="Click.js"></script> 

Click.js:

 var wav = $('#doink-wav')[0]; $('#doink').click(function() { wav.play(); }); 

Q: Using HTML / JavaScript, how to make go doink Android device?

+4
source share
1 answer

You can try the Buzz api ,

Buzz is a small but powerful Javascript library that allows you to easily take advantage of the new HTML5 audio element. This degrades gracefully on non-modern browsers.

+1
source

All Articles