Close Menu
  • Home
  • Cd-player
  • Headphones
  • Microphones
  • Mp3-players
  • Receivers and Amplifiers
  • Speaker
Search

Subscribe to Updates

Get the latest creative news from FooBar about art, design and business.

[wpforms id="14044" title="false"]
What's Hot

Disney Mixes it Up with Pint-Sized MP3 Player

21 June 2024

Onkyo C-N7050 review | What Hi-Fi?

21 June 2024

The best gaming speakers of 2024: Expert recommended

21 June 2024
Facebook X (Twitter) Instagram
Facebook X (Twitter) Instagram
Dutchieeaudio
  • Home
  • Cd-player
  • Headphones
  • Microphones
  • Mp3-players
  • Receivers and Amplifiers
  • Speaker
Dutchieeaudio
Home»Mp3-players»How to Embed a Free MP3 Player on Your Website: 3 Ways
Mp3-players

How to Embed a Free MP3 Player on Your Website: 3 Ways

dutchieeaudio.comBy dutchieeaudio.com22 February 2024No Comments4 Mins Read
Share Facebook Twitter Pinterest LinkedIn Tumblr Reddit Telegram Email
Share
Facebook Twitter LinkedIn Pinterest Email

If you need your web site guests to take pleasure in an MP3 file, one of many best methods to do that is to embed it on the web page. With an embedded MP3 participant, guests needn’t instantly obtain the audio or use extra software program as a result of it performs inline.




We will element completely different strategies that you need to use to embed an MP3 in your web site, together with utilizing HTML5 and Google Drive.


1. Embed an MP3 on Your Web site With HTML5

In the event you’re snug modifying the code of your web site, one of many best methods to embed an MP3 file is to make use of HTML5.

The HTML5 tag would possibly seem primary on first sight, nevertheless it’s highly effective because it’s appropriate with all main desktop and cell browsers.

To embed an MP3 with HTML5, use this code:

 <audio controls><supply src="MP3 URL HERE" kind="audio/mpeg">Your browser doesn't assist the audio tag.</audio> 

Merely change MP3 URL HERE together with your uploaded audio file. This can’t be a file saved in your pc; it should be out there on-line.

This code will place a small audio participant on the web page, from which the person can play, pause, scrub, and regulate the amount. Here is what it appears like on Firefox:

html5 audio player


This code additionally features a message that can show instead of the media participant, within the unlikely circumstance that the person’s browser does not assist the participant.

You possibly can apply attributes equivalent to autoplay and looplike so:

 <audio controls autoplay loop><supply src="MP3 URL HERE" kind="audio/mpeg">Your browser doesn't assist the audio tag.</audio> 

Keep in mind that the majority browsers will not assist autoplay as a result of it is thought of dangerous follow to robotically power audio onto customers.

Fundamental customization could be utilized to the audio participant block through CSS, like border and padding. Nonetheless, you will want to make use of JavaScript to correctly type the participant itself in order that it is constant throughout browsers.

Extra details about the HTML5 audio participant attributes and customization could be discovered on MDN Internet Docs.

Associated: Cool HTML Results Anybody Can Add to Their Web sites

2. Embed an MP3 on Your Web site With Google Drive

Google Drive is a wonderful and free cloud storage supplier. You should use it to add your MP3 file and create an audio participant.

With the MP3 uploaded to Google Drive:

  1. Proper-click the file and click on Get hyperlink.
  2. Change the accessibility restriction to Anybody with the hyperlink.
  3. Lastly, click on Copy hyperlink.


This will provide you with a URL much like this:

 https://drive.google.com/file/d/123/view?usp=sharing 

Exchange view?usp=sharing with previewlike so:

 https://drive.google.com/file/d/123/preview 

Then, use an