locus sonus > audio in art

locus sonus > Help Media mp3

Last changed: 2009/02/14 21:06


This revision is from 2009/02/07 14:24. You can Restore it.

MP3 embed with QT

To embed a mp3 soundfile

 {html}<object data="" 
type="audio/mp3" width="300" height="16">
<param name="src" value="" />
<param name="controls" value="console" />
<param name="autostart" value="false" />
<param name="loop" value="0" />
<param name="volume" value="100" />

MP3 embed with Flash

To embed a mp3 soundfile with dewplayer

The mp3 soundfiles are automatically read with the help of a light flash player : dewplayer (only 4k).

You need to first install the flash player. Download it here : .

Put this file in the same directory than index.php. Replace the exact url of the dewplayer location into the mp3 player string into the index.php.

Thus you can upload your mp3 files thanks to the Upload plugin. They will be available on the Data folder.

Syntax :

[=data/mp3/yourfile.mp3] (put = before the url)

Example :

With external http soundfile links, you can use the same wiki code if you're not using openwindow scripts for http links in the index.php files.

The alternative way is to use {html} embed like this :

<object type="application/x-shockwave-flash" 
width="200" height="20">
<param name="wmode" value="transparent">
<param name="movie" 
value="" />

here is an example with a soundfile :

Another version of the player permits to play sound playlists :


In this version, you must put the soundfile list like this (separated by a pipe) :

/media/sounds/test.mp3|/media/sounds/test2.mp3|/media/sounds/test2.mp3 etc.

Features :

- mp3 tags are recognized and are played by the player during the listening

- &autoplay=1 → automatic play

- &autoreplay=1 → loop

- &showtime=1 → show time in mn:sec

- &volume=80 → selected volume

- &randomplay=1 → random play (with dewplayer-multi.swf)

- &nopointer=1

- &bgcolor=CCCCCC → specify the background color (without #)

Here is the full code for embedding (even if the example above works too)

(example with classic dewplayer)

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
width="200" height="20" id="dewplayer" align="middle">
<param name="wmode" value="transparent" />
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="dewplayer.swf?mp3=test.mp3" />
<param name="quality" value="high" />
<param name="bgcolor" value="CCCCCC" />
<embed src="dewplayer.swf?mp3=test.mp3" quality="high" bgcolor="CCCCCC" width="200" height="20" 
name="dewplayer" wmode="transparent" align="middle" allowScriptAccess="sameDomain" 
type="application/x-shockwave-flash" pluginspage="">

Another flash jukebox mp3 player is available here :

To embed a mp3 soundfile with swfplayer 2 (english doc) (french doc)

 {html}<script type="text/javascript" src=""></script>
<script type="text/javascript">
var flashvars = {};
flashvars.sonDepart = "";
flashvars.titreDepart = "Dolphins+sea";
var params = {};
params.quality = "high"; = "false";
params.loop = "false";
params.bgcolor = "#000000";
params.allowfullscreen = "false";
var attributes = {}; = "lecteur";
swfobject.embedSWF("", "lecteur_contenant", "632", "28", "9.0.0", false, flashvars, params, attributes);
<div id="lecteur">
<p id="lecteur_contenant"></p>