Potential method to play sounds on button press?

JoJa15 shared this question 5 years ago
Answered

Is there a way to attach audio to a button press utilizing the web audio api?


Here is an example:


http://www.html5rocks.com/en/tutorial...


Could I utilize this method to play a sound on a button click?


If I used this method could I do so in a way that would not display any elements i.e. controls, the sound would play without anything else being visible to trigger it?


If I used this method would I have to provide direct links to the sound files on the internet or would the sound files be embedded in the .vp file?

Comments (5)

photo
1

You can embed any HTML code into your prototype using the HTML widget. You can try with the example you have at the end of this tutorial: http://www.html5rocks.com/en/tutorial...

photo
1

OK, I will give that a try.


Will the program embed my sounds in the .vp file or will I need to provide hard coded links to the files on the internet? I am assuming I will need to provide hard coded links?


Would it be possible to add a sound file as a pdf object and then somehow reference it from html? I could set the pdf object to not visible. If I could reference it from the html would I just put the name and no path or would I need to supply a path?

photo
1

Hi there,


We're happy to inform you that Justinmind (version 7.9) now lets you embed .wav and .mp3 audio files in your prototypes.


This is a great new feature for adding rich, dynamic content to your interactive designs, and will give your prototypes an even more realistic edge.


Check it out for yourself here.


Best,


Sonia Durán

photo
1

Hi Sonia,

This audio doesn't play if I launch my prototype outside of the simulator, eg as a published prototype in the browser.

Is it limited to paid subscriptions?

Ref: https://www.justinmind.com/community/topic/event-action-with-play-audio-does-not-work-outside-simulator

Thanks!

NJ

photo
1

Dear Nipun,


Can you specify the computer/OS/Browser you are using?


Best,


Sonia Durán

photo