This article is updated to address the difference in the way the code is interpreted by the different browsers, namely Internet Explorer and Mozilla Firefox. We have also included a sample music file which you can use to test the effects of adding the sound file to your Blog.“Music, the greatest good that mortals know,
And all of heaven we have below.” ... Joseph Addison
Depending on the subject matter of your blog, having music played in the background may either enhance the pleasure of reading or annoy your visitor. Imagine the agony of surfing the web in discreet, only to catch the attention of your office colleagues or parents when the music automatically blasts off in the background. Not to mention, a big music file may cause a slower page download. Nevertheless, the solution, as shall be explained later, is simple - have an option for the reader to play or stop the music.
To begin, you will need to have a music file uploaded onto a server.Upon uploading, note down the URL of the file.
Alternatively, there are several sites that offer free download of their music files. You can enter search words like “free music download” or search for a popular artist name in the Google search box. Most of the sites that offer free download will lead you to the file location stored in their servers. Copy the URL of the music file that you have chosen.
If you would like to hear how the music works on your Blog, you can also use this music file which we have uploaded onto Google Pages -
http://ownlblog.googlepages.com/BalladePourAdeline.mid - whenever you are prompted to enter the “
URL of music file”. This file is for testing purposes only. Please do not link permanently to this file as it may be changed or deleted in due course.
Next, you would have to decide how you want the music to be played.
Link for reader to clickThis is a text link. Your visitor can click the link if he wants to hear the music.
<a href="URL of music file">Click to hear music file</a> |
---|
Remember to enter the
URL of music file into the above code. This code can be inserted into your Blog post. If you want to put it in your sidebar, you can go to Template -> Page Elements -> Add a Page Element, select HTML/JavaScript and insert the code. Whatever words you type into the “Click to hear music file” will appear as the text link.
Music with a consoleA music player console with controls of the volume, on and off buttons, would give your visitors a choice on how he wants the music played. With the code stated below, the music will not play unless the visitor clicks the play button.
You can either insert the music console into your Blog post or your sidebar. If you want it in the sidebar, go to Template -> Page Elements -> Add a Page Element, select HTML/JavaScript.
The code to insert is this:-
<embed autostart="false" height="40" loop="true" playcount="2" src="URL of music file" width="300"/></embed>
|
---|
For instance, using the following code:-
<embed autostart="false" height="40" loop="true" src="http://ownlblog.googlepages.com/BalladePourAdeline.mid" width="300"/></embed>
|
---|
this is what you see:-
0 comments:
Post a Comment