Jukebox avec radio

Description

Lu,
alors je me suis amusé à créé un petit jukebox pour webmaster mais il y a encore quelque modife à faire dessus pour coriger les bugs.aller @++
Il marche nikel sous IE enfin aucun bug connu pour l'instant.
Sous FireFox les boutons ne marche pas pour la radio, pour la music je c'est pas car il faut un plugin que je n'est pas, sinon la radio on l'entend très bien.
aller @++

Source / Exemple :


<html><head>
	<title>Jukebox créé par Crashtest</title>
<STYLE type=text/css>
<!--
input {
background-color: transparent;
color: white;
font-size: 100%;
font-weight: bolder;
border-style: none;
border-width: 0px;}
select {
background-color: white;
color: gray;
font-size: 80%;
font-weight: bolder;
border-style: none;
border-width: 0px;}
a:link {
color: white;}
a:visited  {
color: white;}
a:hover  {
color: black;
text-decoration: none;}
-->
</STYLE>

<script>

// Début du slide pour le titre joué
var msg = "MESSAGE";
var index = 0;
var tps = 200;

function slide() {
document.frm.nom.blur();
var nb_char=msg.length;
index++;
if (index>nb_char) index=0;
document.frm.nom.value=msg.substring(index)+msg;
setTimeout("slide()",tps);}

function text2(txt) {
	msg=txt + "   -   ";
	slide();}

function text() {
if(document.getElementById('url').value == urlzic1) {text2(nomzic1);}
if(document.getElementById('url').value == urlzic2) {text2(nomzic2);}
if(document.getElementById('url').value == urlzic3) {text2(nomzic3);}
if(document.getElementById('url').value == urlzic4) {text2(nomzic4);}
if(document.getElementById('url').value == urlzic5) {text2(nomzic5);}
if(document.getElementById('url').value == urlzic6) {text2(nomzic6);}}
function text1(){
if(document.getElementById('url2').value == urlradio1) {text2(nomradio1);}
if(document.getElementById('url2').value == urlradio2) {text2(nomradio2);}
if(document.getElementById('url2').value == urlradio3) {text2(nomradio3);}
if(document.getElementById('url2').value == urlradio4) {text2(nomradio4);}
if(document.getElementById('url2').value == urlradio5) {text2(nomradio5);}
if(document.getElementById('url2').value == urlradio6) {text2(nomradio6);}
if(document.getElementById('url2').value == urlradio7) {text2(nomradio7);}
if(document.getElementById('url2').value == urlradio8) {text2(nomradio8);}
if(document.getElementById('url2').value == urlradio9) {text2(nomradio9);}
}
// Fin du slide

function stopError() {
if(top.EmBeD.document.getElementById('zic').src == 'undefined') {alert('Choisissez votre music ou votre station de radio.');return true;}
else {return true;}}
window.onerror=stopError;

// Début ouverture d'un popup dans une iframe
// popup qui sert à lancer le son
function popup(value) {
if(value == ''){}
else {
w=open("",'EmBeD','');	
w.document.write("<embed src=\"" + value + "\" autostart=\"true\" id=\"zic\" controls=\"false\" volume=\"0\" loop=\"-1\"> </embed>");
w.document.close();}}

function popup1(value) {
if(value == ''){}
else {
w=open("",'EmBeD','');	
w.document.write("<OBJECT id=\"zic\" name=\"zic\" CLASSID=\"CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95\" CODEBASE=\"http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,1,5,217\" STANDBY=\"Loading Microsoft® Windows Media? Player components...\" TYPE=\"application/x-oleobject\"><param name=\"Filename\" value=\"" + value + "\"><embed TYPE=\"application/x-mplayer2\" src=\"" + value + "\" autostart=\"true\" id=\"zic\" controls=\"false\" volume=\"0\" loop=\"-1\"> </embed></OBJECT>");
w.document.close();}}
// Fin des popup

// Début réglage du volume
function VolumeUP() {
if (top.EmBeD.document.getElementById('zic').Volume+500<=0)
top.EmBeD.document.getElementById('zic').Volume = top.EmBeD.document.getElementById('zic').Volume + 500;
else top.EmBeD.document.getElementById('zic').Volume=0;}

function VolumeDOWN() {
if (top.EmBeD.document.getElementById('zic').Volume-500>=-5000)
top.EmBeD.document.getElementById('zic').Volume = top.EmBeD.document.getElementById('zic').Volume - 500;
else top.EmBeD.document.getElementById('zic').Volume=-5000;}
// Fin du réglage
</script>
</head>

<body onload="popup();" background="./crashtest_fond.gif">
<form name="frm">
<br><center><input type="text" name="nom" size="40"><br><br>
<a href="#" onclick="top.EmBeD.document.getElementById('zic').play()" onmouseover="document.img_play.src='crash_play2.gif'" onmouseout="document.img_play.src='crash_play.gif'"><img name="img_play" border="0" src="crash_play.gif"></a>  
<a href="#" onclick="top.EmBeD.document.getElementById('zic').pause();" onmouseover="document.img_pause.src='crash_pause2.gif'" onmouseout="document.img_pause.src='crash_pause.gif'"><img name="img_pause" border="0" src="crash_pause.gif"></a>  
<a href="#" onclick="top.EmBeD.document.getElementById('zic').stop();" onmouseover="document.img_stop.src='crash_stop2.gif'" onmouseout="document.img_stop.src='crash_stop.gif'"><img name="img_stop" border="0" src="crash_stop.gif"></a>  
<a href="#" onclick="top.EmBeD.document.getElementById('zic').mute = true;" onmouseover="document.img_muteon.src='crash_muteOn2.gif'" onmouseout="document.img_muteon.src='crash_muteOn.gif'"><img name="img_muteon" border="0" src="crash_muteOn.gif"></a>  
<a href="#" onclick="top.EmBeD.document.getElementById('zic').mute = false;" onmouseover="document.img_muteoff.src='crash_muteOff2.gif'" onmouseout="document.img_muteoff.src='crash_muteOff.gif'"><img name="img_muteoff" border="0" src="crash_muteOff.gif"></a>  
<a href="#" onclick="VolumeUP();" onmouseover="document.img_up.src='crash_up2.gif'" onmouseout="document.img_up.src='crash_up.gif'"><img name="img_up" border="0" src="crash_up.gif"></a>  
<a href="#" onclick="VolumeDOWN();" onmouseover="document.img_down.src='crash_down2.gif'" onmouseout="document.img_down.src='crash_down.gif'"><img name="img_down" border="0" src="crash_down.gif"></a>
<br><br>
<script>

// Enregistrer le titre de vos music
var nomzic1 = "00 - Mob crashtest";
var nomzic2 = "Jukebox créé par Crashtest";
var nomzic3 = "Jukebox créé par Crashtest";
var nomzic4 = "Jukebox créé par Crashtest";
var nomzic5 = "Jukebox créé par Crashtest";
var nomzic6 = "Jukebox créé par Crashtest";

// Enregistrer l'adresse de vos music
var urlzic1 = "00 - Mob crashtest.WAV";
var urlzic2 = "";
var urlzic3 = "";
var urlzic4 = "";
var urlzic5 = "";
var urlzic6 = "";
document.write('<select size=\"8\" id=\"url\" onChange=\"popup(document.getElementById(\'url\').value);text();\">');
document.write('<option value=\"\">Liste de music</option>');
document.write('<option value=\"\">--------------</option>');
document.write('<option value=\"'+urlzic1+'\">'+nomzic1+'</option>');
document.write('<option value=\"'+urlzic2+'\">'+nomzic2+'</option>');
document.write('<option value=\"'+urlzic3+'\">'+nomzic3+'</option>');
document.write('<option value=\"'+urlzic4+'\">'+nomzic4+'</option>');
document.write('<option value=\"'+urlzic5+'\">'+nomzic5+'</option>');
document.write('<option value=\"'+urlzic6+'\">'+nomzic6+'</option>');
document.write('</select>');

// Enregistrer le nom des radios
var nomradio1 = "Activ radio";
var nomradio2 = "CherieFM";
var nomradio3 = "Europe 1";
var nomradio4 = "Europe 2";
var nomradio5 = "France inter";
var nomradio6 = "Fun radio";
var nomradio7 = "Scoop";
var nomradio8 = "Skyrock";
var nomradio9 = "Vibration";

//Enregistrer l'adresse des radios
var urlradio1 = "http://live.activradio.com:8001/.m3u";
var urlradio2 = "http://player.cheriefm.fr/V4/cheriefm/cheriefm.asx";
var urlradio3  = "http://cache.yacast.fr/V4/europe1/europe1.asx";
var urlradio4 = "http://www.tv-radio.com/station/europe_2/europe_2-20k.asx";
var urlradio5 = "http://cache.yacast.fr/V4/franceinter/franceinter.asx";
var urlradio6 = "http://yacast.funradio.fr/V4/fun/fun.asx";
var urlradio7 = "http://www.tv-radio.com/cgi-bin/tagger.pl?tag=site&metafile=scoop/scoop-20k.asx";
var urlradio8 = "http://cache.yacast.fr/V4/skyrock/skyrock.asx";
var urlradio9 = "http://www.tv-radio.com/cgi-bin/tagger.pl?tag=site&metafile=vibration/vibration-20k.asx";
document.write('<select size=\"8\" id=\"url2\" onChange=\"popup1(document.getElementById(\'url2\').value);text1();\">');
document.write('<option value=\"\">Liste de radio</option>');
document.write('<option value=\"\">--------------</option>');
document.write('<option value=\"'+urlradio1+'\">'+nomradio1+'</option>');
document.write('<option value=\"'+urlradio2+'\">'+nomradio2+'</option>');
document.write('<option value=\"'+urlradio3+'\">'+nomradio3+'</option>');
document.write('<option value=\"'+urlradio4+'\">'+nomradio4+'</option>');
document.write('<option value=\"'+urlradio5+'\">'+nomradio5+'</option>');
document.write('<option value=\"'+urlradio6+'\">'+nomradio6+'</option>');
document.write('<option value=\"'+urlradio7+'\">'+nomradio7+'</option>');
document.write('<option value=\"'+urlradio8+'\">'+nomradio8+'</option>');
document.write('<option value=\"'+urlradio9+'\">'+nomradio9+'</option>');
document.write('</select>');
</script>
<br><br><a href="http://crashtest666.serveftp.net" target="_blank">Site de crashtest</a><br><br><br><br></center>
<iframe src="" style="visibility:hidden;position:absolute;" name="EmBeD"></iframe>
</form>
<SCRIPT LANGUAGE="JavaScript"><!--
text2('Jukebox créé par Crashtest');
//--></SCRIPT>
</body></html>

Conclusion :


Alors voila le code que j'ai mis est juste pour le script car il manque toute les images alors prenner le zip tout est dedans aller @++

Codes Sources

A voir également

Vous n'êtes pas encore membre ?

inscrivez-vous, c'est gratuit et ça prend moins d'une minute !

Les membres obtiennent plus de réponses que les utilisateurs anonymes.

Le fait d'être membre vous permet d'avoir un suivi détaillé de vos demandes et codes sources.

Le fait d'être membre vous permet d'avoir des options supplémentaires.