locus sonus > Help Media mp3Last changed: 2009/02/15 03:06
|
||
|---|---|---|
Difference between revisions from 2009/02/14 21:06 and 2009/02/07 14:26.{include:subpage help}
{tags:Help, Syntax, Lionwiki}
{TOC}
! MP3 embed with QT
!! To embed a mp3 soundfile
{html}<object data="http://simplythebest.net/sounds/MP3/sound_effects_MP3/sound_effect_MP3_files/bee.mp3" type="audio/mp3" width="300" height="16">
<param name="src" value="http://simplythebest.net/sounds/MP3/sound_effects_MP3/sound_effect_MP3_files/bee.mp3" />
<param name="controls" value="console" />
<param name="autostart" value="false" />
<param name="loop" value="0" />
<param name="volume" value="100" />
</object>{/html}
{br}
{br}
{{ ^{html^}<object data="http://simplythebest.net/sounds/MP3/sound_effects_MP3/sound_effect_MP3_files/bee.mp3"
type="audio/mp3" width="300" height="16">
<param name="src" value="http://simplythebest.net/sounds/MP3/sound_effects_MP3/sound_effect_MP3_files/bee.mp3" />
<param name="controls" value="console" />
<param name="autostart" value="false" />
<param name="loop" value="0" />
<param name="volume" value="100" />
</object>^{/html^} }}
{br}
{br}
{br}
{br}
!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 : http://www.alsacreations.fr/dewplayer .
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 :
[=data/mp3/bee.mp3 ]
{br}
{br}
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 :
{{ ^{html^}
<object type="application/x-shockwave-flash"
data="http://www.yourserver.com/LionWikidirectory/dewplayer.swf?mp3=http://www.server.com/path/file.mp3&showtime=1"
width="200" height="20">
<param name="wmode" value="transparent">
<param name="movie"
value="http://www.yourserver.com/LionWikidirectory/dewplayer.swf?mp3=http://www.server.com/path/file.mp3&showtime=1" />
</object>
^{/html^} }}
{br}
{br}
here is an example with a soundfile :
{html}
<object type="application/x-shockwave-flash" data="http://nujus.net/~locusonus/w/dewplayer.swf?mp3=http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3&showtime=1" width="200" height="20">
<param name="wmode" value="transparent">
<param name="movie" value="http://nujus.net/~locusonus/w/dewplayer.swf?mp3=http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3&showtime=1" />
</object>
{/html}
{br}
{br}
Another version of the player permits to play sound playlists :
dewplayer-multi.swf
{html}
<object type="application/x-shockwave-flash" data="http://nujus.net/~locusonus/w/dewplayer-multi.swf?mp3=http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3|http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_18-whale.mp3|http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_22-crocodile.mp3&showtime=1" width="240" height="20">
<param name="wmode" value="transparent">
<param name="movie" value="http://nujus.net/~locusonus/w/dewplayer-multi.swf?mp3=http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3|http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_18-whale.mp3|http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_22-crocodile.mp3&showtime=1" />
</object>
{/html}
{br}
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.
{br}
{br}
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 #)
{br}
{br}
Here is the full code for embedding (even if the example above works too)
(example with classic dewplayer)
{{ ^{html^}
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
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="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
^{/html^} }}
{br}
{br}
Another flash jukebox mp3 player is available here :
http://jeromejoy.org/
{br}
{br}
{br}
{br}
!! To embed a mp3 soundfile with swfplayer 2
http://code.google.com/p/swfobject/ (english doc)
http://egypte.olympe-network.com/swfobject-francais.html (french doc)
{br}
{br}
{br}
{br}
{html}
<script type="text/javascript" src="http://locusonus.org/webs/js/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.sonDepart = "http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3";
flashvars.titreDepart = "Dolphins+sea";
var params = {};
params.quality = "high";
params.play = "false";
params.loop = "false";
params.bgcolor = "#000000";
params.allowfullscreen = "false";
var attributes = {};
attributes.id = "lecteur";
swfobject.embedSWF("http://locusonus.org/w/lecteur.swf", "lecteur_contenant", "632", "28", "9.0.0", false, flashvars, params, attributes);
</script>
<div id="lecteur">
<p id="lecteur_contenant"></p>
</div>
{/html}
{br}
{br}
{{ ^{html^}<script type="text/javascript" src="http://locusonus.org/webs/js/swfobject.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.sonDepart = "http://www.animalpicturesarchive.com/animal/SOUND/animal_sounds_17-dolphin.mp3";
flashvars.titreDepart = "Dolphins+sea";
var params = {};
params.quality = "high";
params.play = "false";
params.loop = "false";
params.bgcolor = "#000000";
params.allowfullscreen = "false";
var attributes = {};
attributes.id = "lecteur";
swfobject.embedSWF("http://locusonus.org/w/lecteur.swf", "lecteur_contenant", "632", "28", "9.0.0", false, flashvars, params, attributes);
</script>
<div id="lecteur">
<p id="lecteur_contenant"></p>
</div>^{/html^} }}
|
||
|
Lab 2013/2014: Elena Biserna, Stéphane Cousot, Laurent Di Biase, Grégoire Lauvin, Fabrice Métais, Marie Müller, (Julien Clauss, Alejandro Duque), Jérôme Joy, Anne Roquigny, Peter Sinclair. 2008/2014 — Powered by LionWiki 2.2.2 — Thanks to Adam Zivner © images Locus Sonus webmaster & webdesign : Jérôme Joy contact: info (at) locusonus.org 2004-2014 Locus Sonus |
||
Article:
Admin functions:
Other:
Search:
Language:
Info:
Powered by LionWiki 2.2.2
Tested on FireFox2, FireFox3, Safari2, Safari3