To have full control of the music players that one can use on a website, it's common to use a music player object, usually built using Flash. I personally use and recommend the Dewplayer, as it gives you a clean modern look, being at the same time discrete. It is also free and the package comes along with different players so you can chose the one you prefer. Their website is really helpful, but as the whole procedure can be a bit tricking, I'll try to give it some more insight. If you prefer not to use this but other player, just follow the general steps.
There is a multitude of ways to incorporate (embed) these objects in a website. I think the easiest is just using some basic html lines, where the location of the different objects and files is displayed. I found most instructions about this and other html basic procedures a bit confusing. So, I'll try to give a rough explanation of the requirements of this kind of setting, using a player able to play different songs and showing the playlist. So let's get started! You'll need four things: 1. the Mp3 files you wish to play (your songs). Make sure they are in a standard Mp3 format; 2. the music player object (usually with a filename that ends in .SWF, meaning it's a Flash technology object). 3. A text document, containing the information for the player to read. This document should have a .xml extension; 4. The html code to insert in your page For explanatory purposes, lets say you are named John, your website is http://jonhsonline.com and you want that player to render two songs, Mary sleeps.mp3 and Mary awakes.mp3. Step 1: - Upload all the Mp3 files to your site or server. After this, you should have a web address for each file, something like http://jonhsonline.com/uploads/marysleeps.mp3 and http://jonhsonline.com/uploads/maryawakes.mp3 Check that the address ends with .mp3; Copy-paste the addresses to a text document (word, notepad, anything is fine). Repeat this procedure for all the Mp3's. Step 2: - Now you need to get and upload your .SWF object, the player itself. Get it from some site and upload it also on your website or server. Like I said, I went for Dewplayer. If the object comes in a ZIP or RAR files, just uncompress it to your desktop. After the upload, your object's address should be something like http://jonhsonline.com/uploads/jonhsmusicplayer.swf; Again, Copy-paste this address to a text document; Step 3: Open a new Notepad file (or any text file), and copy the following: <?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <track1> <location>Mp3 Location</location> <creator>Mp3 creator</creator> <album>Album name</album> <title>Mp3 title (song name)</title> </track1> </trackList> </playlist> Step 4: Now you have to fill in the the previous BOLD fields (Location, creator, name and title) . You need to insert the specific information for each Song in order to have a nice Playlist, so you'll have to have different track information (track1, track 2 and so on). So: - Replace Mp3 Location for the address of your file (the one that starts with http://... and ends with .mp3); - input the Mp3 creator's name: yours, the band, etc. - input the Album name - input the song title; For John's example: <?xml version="1.0" encoding="UTF-8"?> <playlist version="1" xmlns="http://xspf.org/ns/0/"> <trackList> <track1> <location>http://johnswebsite.com/uploads/marysleeps.mp3</location> <creator>John</creator> <album>John goes Live</album> <title>Mary Sleeps</title> </track1> <track1> <location>http://johnswebsite.com/uploads/maryawakes.mp3</location> <creator>John</creator> <album>John goes Live</album> <title>Mary Sleeps</title> </track1> </trackList> </playlist> Step 5: Save your playlist text document as playlist.xml; Step 6: Upload this playlist to your website, like you did with the previous files. It should be something as: http://johnswebsite/uploads/playlist.xml Step 7: Now you need the html code to connect all these elements and display the player in your webpage. So, the .SWF player, using the playlist.xml will play the .mp3 files: <object data="http://jonhsonline.com/uploads/jonhsmusicplayer.swf" id="dewplayer" name="dewplayer" height="200" width="240"> <param name="wmode" value="transparent"> <param name="movie" value="http://jonhsonline.com/uploads/jonhsmusicplayer.swf"> <param name="flashvars" value="showtime=true&autoreplay=false&xml=http://johnswebsite/uploads/playlist.xml"> </object> Again, the previous fields in BOLD are the one you have to work on, replacing these with your information. Step 8: Copy and paste the previous code, after you've made all the necessary changes, to your website, blog, etc. Final note: There are websites that "build" you a code with all the settings, but you usually have to upload your songs to their server and the player bring publicity attached. Ok, and that's it. You can surf my website to see some of these players in action. Be aware that these procedures take some time to achieve and control properly. Be patient and don't hesitate if you have questions. I'm no expert but maybe I can help!
0 Comments
Leave a Reply. |