Using HTML5 and jQuery Mobile I have a page with 3 buttons.
What I want to do is have each button select a different sound, then have another button to play the selected sound.
Can anyone give me a steer?
Thanks
Jim
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Check-out the HTML5
<audio>tag. You can pre-load audio clips and play them when the user interacts with elements.Docs for
<audio>: https://developer.mozilla.org/en/HTML/Element/audioYou may want to check-out a pre-made plugin for this, I have seen JPlayer used a lot: http://jplayer.org/
Although a plugin will not be necessary, the HTML5
<audio>tag comes with the ability to control it using JavaScript.