Putting Audio Content on a Website

I have a few methods that I am going to outline for putting audio content on a website in html. Before you do any of these, you have to upload your audio to your website with your preferred file upload system. You can directly embed a link in your website such that when you click on the link, a person is redirected to a blank page that plays audio with your browser’s embedded audio player. Here is the code, input without the quotes and you will get a link like I described

CODE: “<a href=”actualsoundfilename.mp3″>Display_Name_Of_Audio</a>”

However, this isn’t very appealing or interesting. Google has a nice alternative, a webpage embedded FLASH MP3 player that has a pretty nice display can be used with this code:

CODE: “Your_Exact_Audio_File_URL” src=”http://www.google.com/reader/ui/3523697345-audio-player.swf” width=”400″ height=”27″ quality=”best”>”

Bear in mind, with this, you have to type in the URL of your mp3 file, not just the name.

There is another basic player that you can use:

CODE: “<embed src="http://www.yourwebsite.com/audiofile.mp3/" loop="true" autoplay="false" hidden="false" width="145" height="60"></embed>"

The width and height represents the size of the player. Autoplay has to be inputted as “true” or “false”. If you leave it as false, the file will not play until a user clicks play on the display. If you input true, the file will begin to play regardless of user input. hidden can also be entered as true or false, hidden=”false” will not display the player, and can be used to play background music on your page if you set autoplay to true. loop simply controls whether or not the file plays again, again by enter “true” or “false”. Volume is on a scale from 1-100, if you don’t enter it, it will default to 50. If you don’t want to enter any of the variables, they will default. loop defaults to false, autoplay also defaults to false. hidden defaults to true. You must enter width and height however for the display to work.

Hope this helps!


~ by fingoscrip on November 7, 2010.

%d bloggers like this: