Without a reader
- The *.mp3 file must be completely loaded into the local computer. The sound is then played with the local reader associated with *.mp3 files
- No security restrictions for cross-domain
- The user must wait
- Try to play the song, Mozart, Requiem, Dies Irae
With a reader
- This allow to read the *.mp3 file like a stream. The sound is played as soon (few seconds) after reading.
- Security restrictions for cross-domain. The *.mp3 file must be in the same domain as the swf file
- The user don't wait
- Listen O Fortuna, Carl Orff, Carmina Burana
Upload the reader - dewplayer
- I use dewplayer, a light (4K) flash player. This player is free
- Upload into your site, the dewplayer.swf from alsacreations
Using <object> to embed dewplayer
- Type this code, data and value must be typed within one line :
<object type="application/x-shockwave-flash"
data="http://YOURSITE/dewplayer.swf?
mp3=http://YOURSITE/YOURFILE.mp3
&showtime=1
&bgcolor=c3d9ff
&volume=80"
width="200" height="20">
<param name="movie"
value="http://YOURSITE/dewplayer.swf?
mp3=http://YOURSITE/YOURFILE.mp3
&showtime=1
&bgcolor=c3d9ff
&volume=80" />
</object>
data="http://YOURSITE/dewplayer.swf?
mp3=http://YOURSITE/YOURFILE.mp3
&showtime=1
&bgcolor=c3d9ff
&volume=80"
width="200" height="20">
<param name="movie"
value="http://YOURSITE/dewplayer.swf?
mp3=http://YOURSITE/YOURFILE.mp3
&showtime=1
&bgcolor=c3d9ff
&volume=80" />
</object>
- We can cConfigure your player, adding these optional values :
&autoplay=1 Start play when the page is loaded
&autoreplay=1 Continuous reading
&autoreplay=1 Continuous reading
- Other values :
&showtime=1 Show duration
&bgcolor=rrggbb Color code (htm) without #
&volume=xx 0 no sound, 100 higher volume
&bgcolor=rrggbb Color code (htm) without #
&volume=xx 0 no sound, 100 higher volume
Remove the tool-tip Click to activate ...
- For some version of IE, we must click 2 times on the object to play the sound. This is an ActiveX control security warning, due to a change on IE.
- To remove this Click to activate and use this control tool-tip, Adobe give a turnaround, which mainly, call the flash player with a special javascript
- Upload Ac_RunActiveContent into GPC from Adobe.
- Loda the script :
<script type="text/javascript
src="http://YOURSITE/AC_RunActiveContent.js"">
</script>
- Finally, call the reader within a javascript
- Note, src must be typed within one line, and, there is no extension to the player name :
<script type="text/javascript">
AC_FL_RunContent('width','200'
,'height','20'
,'wmode','transparent'
,'align','middle'
,'type','application/x-shockwave-flash'
,'src','http://YOURSITE/dewplayer?
mp3=http://YOURSITE/YOURFILE.mp3
&volume=80
&showtime=1
&bgcolor=c3d9ff'
,'allowScriptAccess','sameDomain'
,'quality','high'
,'bgcolor','#c3d9ff');
</script>
- Listen Mozart, Requiem, Dies Irae :
Using dewplayer-multi
- You need to use the pipe character inside the data and value attributes (again, within one line) :
- Pipe character can by typed with alt+0124
"http://YOURSITE/dewplayer-multi.swf?
mp3=YOURFILE1.mp3|YOURFILE2.mp3... "
- But, with dewplayer-multi, the pipe character must be URL encoded with %7C
"http://YOURSITE/dewplayer-multi.swf?
mp3=YOURFILE1.mp3%7CYOURFILE2.mp3... "
mp3=YOURFILE1.mp3%7CYOURFILE2.mp3... "
Google Gadget with the dewplayer Reader
- I create a Google Gadget containing the dewplayer reader, to play MP3 sounds :
Using a Playlist with XSPF Web Music Player
- XSPF Web Music Player is a flash-based web application that uses xspf playlist format to play mp3 songs. XSPF is the XML Shareable Playlist Format
- I use the Extended version
- Upload into your site the xspf_player.swf
- The Playlist and the Player must be hosted in the same Domain
Creating a Playlist
- Technical specification can be found in XSPF (spiff) site
- The basic structure of the .xspf file is as follows :
<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "http://xspf.org/ns/0/">
<title>My Playlist</title>
<trackList>
<track>
<location>URL/name1.mp3</location>
<image>URL/name1_pic.jpg</image>
<annotation>info text for name1</annotation>
<info>URL for more info about name1</info>
</track>
<track>
...
</track>
</trackList>
</playlist>
</playlist>
- Save the file with the extension .xspf and upload it into your site
Using <object> to embed XSPF player
- Type this code, data and value must be typed within one line, with same content :
<object type="application/x-shockwave-flash"
data="http://YOURSITE/xspf_player.swf?
autoload=true
&playlist_url=http://YOURSITE/tracklist.xspf"
width="400" height="170">
<param name="movie"
value="http://YOURSITE/xspf_player.swf?
autoload=true
&playlist_url=http://YOURSITE/tracklist.xspf">
<param name="allowScriptAccess" value="always'>
<param name="quality" value="high">
<param name="bgcolor" value="#c3d9ff">
</object>
data="http://YOURSITE/xspf_player.swf?
autoload=true
&playlist_url=http://YOURSITE/tracklist.xspf"
width="400" height="170">
<param name="movie"
value="http://YOURSITE/xspf_player.swf?
autoload=true
&playlist_url=http://YOURSITE/tracklist.xspf">
<param name="allowScriptAccess" value="always'>
<param name="quality" value="high">
<param name="bgcolor" value="#c3d9ff">
</object>
- To configure the player, use these parameters :
&playlist_url : the url of the xspf file to load
&autoplay : true/false, to start playing without click
&autoload : true/false to load the playlist without click
&autoplay : true/false, to start playing without click
&autoload : true/false to load the playlist without click
- Listen my Playlist :
Removing the <object> tag
- AS for dewplayer, we can call the player with a javascript :
<script type="text/javascript">
AC_FL_RunContent('width','440'
,'height','180'
,'type','application/x-shockwave-flash'
,'src','http://YOURSITE/xspf_player?
playlist_url=http://YOURSITE/tracklist.xspf'
,'allowScriptAccess','always'
,'quality','high'
,'bgcolor','#c3d9ff');
</script>
- Listen my Playlist, calling the player without <object> tag :
A Google Gadget with a Flash Reader
- I create a Google Gadget to play Flash Playlist :
More Informations
- Play MP3 clicking on a picture
- Playing sounds within Google Sites
- How to incorporate a Playlist within Google Sites
- Playing sounds from IMEEM
- How to use ODEO Flash Player
- Playing a MP3 File in Blogger
- Inserting a MP3 player in Blogger
- Google Gadget : The swiss army knife for your site
One Day - One Label - One Wine









