Starting the post with a well known verse “Your Songs Belong to Us”. Sounds funny but this is really true that you can’t hide your songs on the web. Your all songs that you put in your server, literally you also put on other computers . Because an advance user know how to download your songs/videos. You may use RTMP protocol or HTTP protocol for streaming and you may spend extra money to get a media server such as FMS, Wowza etc but it will hurt you that still you can’t save your songs from the web soldiers. What this RTMP connection does is, it can protect you from maximum users, because maximum general users will not get a direct link of download location of your songs. My question is, if I spend extra money , time and still can’t protect my songs from all users then what’s the point to spend extra money? Rather how about if we set it up such way so that I still can protect my songs that media server allows me to and I dont have to spend extra money and time?
Let’s say you have song albums, you don’t want let users to download your songs but listen to them and you want to pretend direct download from 95% users…i’m gonna discuss how we can do it. This part will describe the basic setup and how we can play a song on the web. So first part is going to be pretty simple but second part will be most interesting and important part.
No extra requirement needed! You have an apache server that will work. So let’s set it up….and well, we need a media player like JW Player. It’s free for no-commercial purpose. So we will use the free version for our example. Let’s download the free version and you have setup wizard to make your life easy. Once you have the player you can use the following example codes that has 2 tags for each song/playlist.
<script type='text/javascript' src='player/swfobject.js'></script> <h3>I Need You</h3> <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' width='300' height='24' id='player1' name='player1'> <param name='movie' value='player.swf'> </param><param name='allowfullscreen' value='true'> </param><param name='allowscriptaccess' value='always'> </param><param name='playlistsize' value='180'> </param><param name='flashvars' value='player/player-viral.swf'> <embed id='player1' name='player1' src='player/player-viral.swf' width='300' height='24' allowscriptaccess='always' allowfullscreen='true' flashvars="file=playlist.xml&playlist=bottom&playlistsize=180" /> </param></object>
You may wonder why I have 2 tags
<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:jwplayer="http://developer.longtailvideo.com/trac/wiki/FlashFormats"> <channel> <title>Example media RSS playlist</title> <item> <title>MP3 Audio</title> <link>http://www.test.com/</link> <description>I miss you..</description> <media :content duration="44" /> <media :credit role="author">Mr. X</media> <media :content url="you.mp3" /> <media :thumbnail url="images/test.JPG" /> </item> <item> <title>MP3 Audio</title> <link>http://www.test.com/</link> <description>Oye Oye..</description> <media :content duration="44" /> <media :credit role="author">Mr. Y</media> <media :content url="you.mp3" /> <media :thumbnail url="images/test.JPG" /> </item> <item> <title>MP3 Audio</title> <link>http://www.test.com/</link> <description>I need you..</description> <media :content duration="44" /> <media :credit role="author">Mr. X</media> <media :content url="test.mp3" /> <media :thumbnail url="images/test.JPG" /> </item> </channel> </rss>
Now, simply just run the page where you placed your player code. And you will see something like the following screenshot.

Example Play List
Make sure you have songs in the same directory or the path you gave in the xml file. This is where we are done with basic setup songs list. But you see anybody can download it from xml list by finding the url. So we are left with main important part of this tutorial. Which I will do in the next part. Will discuss how we can make this list of songs secured so that most of the users face trouble to get it. Stay tune…




