|
|  |
|
|
Online Help > Web Site Publishing > Editing Your Site > Freeform HTML Site > How do I play an audio file on my page?
How do I play an audio file on my page?
To play an audio file when someone visits your site, you will first need to obtain an audio file, such as a MIDI or MP3. If you do not already have a file, there are many places on the Internet where you can download them, many for free. However, before publishing them on your site, make sure that the site you got the audio file(s) from allow you to reuse and publish the file on your site.
Next, you will need to upload the music file onto your Web site. Click here for instructions on how to add a file to your Freeform site.
Once you have your file uploaded, now all you need to do is add HTML code to your site to play the audio file. Within your Freeform HTML file text, insert the following code, replacing "mymusicfile.mid" with the name of your audio file. You can also change loop="true" to be "false" if you do not wish to have the song repeat, or a number such as "5" if you would like it to repeat five times, etc.
<EMBED src="mymusicfile.mid" autostart="true" loop="true"><EMBED>
If you would just like to have a link to your music file, you can do that by using a simple A HREF code tag like the example below.
<A HREF="mymusicfile.mid" target="_blank">Click here to listen to my music file.</A>
Note: If you would like to add this code to a new posting within a Publishing page, you will need to use the full system URL instead of just the name of the file to get this to work properly. You can obtain the system URL by clicking "Web Site Manager," "List Freeform Files" and copying the corresponding URL to the file you would like to use.
|