Article:
  Build a Simple MP3 Player for Your Site
Subject:   TESTED SIMPLE WEBSITE MP3 PLAYER
Date:   2006-04-18 17:23:09
From:   paulwilliamengholm
BY PAUL WILLIAM ENGHOLM


TESTED
SIMPLE WEBSITE MP3 PLAYER
COMMAND SCRIPT INSTRUCTIONS



COMMAND SCRIPT FOR A STANDARD .M3U PLAYLIST MEDIA PLAYER (WITH CENTERING):


PLACE THE FOLLOWING IN YOUR WEB PAGE BETWEEN THE
<BODY> AND </BODY> HEADERS


< p align= "center" ><object width="300" height="42">
<param name="src" value="myplaylist.m3u">
<param name="autoplay" value="true">
<param name="controller" value="true">
<param name="bgcolor" value="#FF9900">
<embed src="myplaylist.m3u"
autostart="true" loop="false"
width="300" height="42" controller="true"
bgcolor="#FF9900"></embed></object>< /p >



NOTE: "myplaylist.m3u" refers to the name of the particular .m3u playlist of songs to be chosen/selected for playback



CREATE A COMPATIBLE .M3U PLAYLIST FOR THE ABOVE IN THE FOLLOWING MANNER:


replace the...


mysong1.mp3
mysong2.mp3
mysong3.mp3


etc...


ON BOTH LINES!


as shown below with those chosen/selected for playback and save this file in notepad
All Files (*.*) 'Wild Card Format'
with an .m3u file extension (as in the example script above: myplaylist.m3u)


DO NOT INCLUDE THE DOUBLE QUOTATION MARKS " " IN THE .M3U FILENAME --- ONLY IN THE MEDIA PLAYER COMMAND SCRIPT!!!


#EXTM3U
#EXTINF:0,mysong1.mp3
mysong1.mp3


#EXTINF:0,mysong2.mp3
mysong2.mp3


#EXTINF:0,example3.mp3
mysong3.mp3


etc...


SAVE THE NOTEPAD .M3U FILE AND ANY .MP3 FILES TO YOUR WEBSITE TO ENSURE THAT THE MEDIA PLAYER HAS CORRECT COMPATIBLE ACCESS TO YOUR SONGS...



EACH SONG WILL BE PLAYED IN THE SUCCESSION OF THE ORDER IN WHICH IT IS LISTED IN THE .M3U FILE...TO GO TO PREVIOUS/NEXT SONG SIMPLY USE THE MEDIA PLAYER CONTROLS!



(another example of command insert of a song in different format that is also compatible with both this Media Player and its accompanying .m3u playlist is "mysong.mid" in the instance of individuals songs in a MIDI format to be played)


PLEASE DELETE PREVIOUS ENTRIES!!!

Full Threads Oldest First

Showing messages 1 through 1 of 1.

  • David Battino photo TESTED SIMPLE WEBSITE MP3 PLAYER
    2006-06-15 00:28:40  David Battino | O'Reilly Blogger [View]

    Mr. Engholm's script may not work on some systems. The latest version of my script also handles m3u playlists, and the syntax for creating them is simpler. Please see http://digitalmedia.oreilly.com/2006/05/31/build-a-better-web-audio-player.html.