Add Music to a Blog Page

Adding Music

Notice that you can cheat by using YouTube videos and then embedding the contend with the video portion not being shown. Use width="200" height="25"

Host on Wikidot
I finally figured out how to implement music pages using Squark's guide. I didn't realize that you can call (execute) code on a page by embeding the page URL with the suffix of /code/1 or whatever number the code block is. Let me break it down:

Music Code Requirements

Upload a music file to a page, let's say you upload it and it is located at http://biasedvideogamerblog.wikidot.com/BlogArticle/local--files/music/Song.mp3

Next, you have to implement Squark's code on a page using the code block:

[[code type="html"]]
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Squark mp3 Player</title>
</head>
<body>
<script language="JavaScript" src="http://bluecorp.wikidot.com/local--files/music/audio-player.js"></script>
<object type="application/x-shockwave-flash" data="http://bluecorp.wikidot.com/local--files/music/player.swf" id="audioplayer1" height="24" width="290">
<param name="movie" value="http://bluecorp.wikidot.com/local--files/music/player.swf">
<param name="FlashVars" value="playerID=1&amp;soundFile=http://biasedvideogamerblog.wikidot.com/BlogArticle/local--files/music/Song.mp3">
<param name="quality" value="high">
<param name="menu" value="false">
<param name="wmode" value="transparent">
</object>
</body>
</html>
[[/code]]

Note the files required for the player are hosted on the test site so I don't have to re-upload them again.

To embed the music player which will play the song, use the following code (don't put it in a code block):

[[iframe http://biasedvideogamerblog.wikidot.com/BlogArticle/local--files/code/1 frameborder="0" scrolling="no" width="320px" height="40px"]]

This line of code executes the first code block on that page.

The result is this example from Squark's site:

For the time being, if the audio or music file is hosted on YouTube, please just embed the video with the smallest video resolution. The implementation of the music player still requires more thought. Also, we need to avoid copyright concerns by not uploading copyrighted music

More detailed information can be found here: http://snippets.wikidot.com/code:mp3-and-video-player

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License