Jump to content

How to add a button that plays a sound (mp3)

Recommended Posts

Site URL: https://tiranube.com

Hi squarespacers. The name of my company is quite exotic (TIRANUBE). I asked a fellow voice artist to record "the right pronunciation", and I'd like to have a button in my home page that read "This is who you pronounce it:" with a small speaker icon. Ideally, when you click it, and you'd hear a 95kb .mp3 my friend sent me.

Thing is, I don't know what would be the best way to make this happen? HTML5 + CSS? Do I need to write some Javascript code?

Or is there a simpler way to accomplish this feat :)?

THANK YOU

Link to comment

Here is a page about adding audio to a web page. This is general info.

HTML Audio

If this is the route you want to go then you add an audio tag to a code block. Of course inserting the URL for your audio files. It's a good idea to have an ogg version of your audio for wider browser support.

Find my contributions useful? Please like, upvote, mark my answer as the best ( solution ), and see my profile. Thanks for your support! I am a Squarespace ( and other technological things ) consultant open for new projects.

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.