How do I add audio on click?

I’m making a prototype of an mobile applications that needs to play audio files when a element is clicked. I’ve been looking, however, I still can’t figure out how to do this. Any help would be great.

Hi CarlosTheBrave,

Welcome to the forum! You can play audio by dynamically linking to a hosted audio file which can be loaded into an Inline Frame widget via an “Open Link” action. The following thread has a good number of suggestions (which you may have seen), and here’s a good example by Paul to start:

https://www.axure.com/c/forum/advanced-prototyping/4963-answered-adding-sound-audio-music.html#post19290

Could you give that a shot? Let me know if you have questions!

Hi Alex,

It doesn’t work. What am I doing wrong?

Play Audio.rp (47.9 KB)

Thanks.

Actually I managed to get it working.

The key is to have the url in the correct format.

From file sharing - How can I hotlink an mp3 in Google Drive with a URL ending in .mp3? - Web Applications Stack Exchange

If you share an MP3 by link, you obtain a link like this

https://drive.google.com/file/d/XXXXXXXXXXXXXXXXXX/view?usp=sharing
where XXXXXXXXXXXXXXXXXX is the ID of your MP3 file. Then you can obtain a direct link to this audio by

http://docs.google.com/uc?export=open&id=XXXXXXXXXXXXXXXXXX

1 Like

this does not work anymore