Windows xp2 wmp11 IE7
URL Application http://www.alain-saez.fr/ (multimedia .mid .kar).
Problème du script avec firefox Fonctionnement Play Stop.
Internet explorer: Musique démarre auto.
play stop fonctionnent.
Mozilla 5.0 firefox 2.0.0.4 Musique démarre si plugin mediawrap 0.1.6.3.installé .
play stop fonctionnent pas.
TEST mozilla windows media player OK (http://members.aol.com/jrzycrim01/mozil ... xtest.html).
TEST about:plugins Plugins, activex, installés
Merci de bien vouloir m'aider à détecter l'erreur.
SCRIPT PLAY.JS (Fin de page).
<!-- play.php nusphere debug project2-->
<link rel = "stylesheet" href = "styles.css" type = "text/css">
<meta http-equiv = "pragma" content = "no-cache">
<SCRIPT language = "JavaScript">
// on ne définie pas de fonction : le script s'éxécutera au chargement de la page
window.resizeTo(380, 450)
// Utile quand on veut resizer une fenetre "classique"
var largeur = screen.availWidth; //calcul auto de la largeur de l'ecran client
var hauteur = screen.availHeight; //calcul auto de la hauteur de l'ecran client
// je veux que ma fenetre soit centrée en hauteur et largeur
// demiL c'est ((largeur totale de l'ecran)-(largeur de ma fenetre)/2)
// faites un dessin si vous comprenez pas le calcul
// meme principe avec demiH
var demiL = ((largeur - (380)) / 2);
var demiH = ((hauteur - (450)) / 2);
window.moveTo(demiL, demiH);
//-->
</SCRIPT>
<?php
include 'config.php';
$fichier= $_GET['fichier'];// VALEUR RETOURNEE PAR $GET EX: $fichier=8 si "AllBlues.mid RECUPERATION DE LA VAR h ref fichier DE INDEX.PHP
////////// cherche type //////////////////
$res=mysql_query("SELECT * FROM $table WHERE id='$fichier'");
while ($row=mysql_fetch_array($res))
{
$taille = $row["taille"]/1024;
$deci = number_format($taille, 2, ',', ' ');
$nom = $row["fichier"]; // EX: $fichier=8 -----> $nom=AllBlues.mid
$clique = $row["clic"];
$ajout = $row["date_ajout"];
}
$type = substr(trim(strtolower($nom)),-3,3); // Ex: si$nom=AllBlues.mid ------> $type="mid"
switch ($type)
{
case "mid":
$rep = "\\midi";
break;
case "kar":
$rep = "\\karaoke";
break;
}
$che_fich= "c:\program files\easyphp1-8\www\\nusphere debug\project2\\";
$rep = $che_fich.$rep;
$che_nom= '\\'.$nom; // ON VEUT QUE $nom="\AllBlues.mid"
//echo $che_nom;
//echo $rep.$nom; // "program files\easyphp1-8\www\nusphere debug\project2\midi\AllBlues.mid "
//VOIR UN LECTEUR MEDIA CLASSID+ RECENT PAS RECONNU DAS AUTRES PC?
?>
<div align="center"style="border: 1px solid #ccc; padding: 8px; margin-bottom: 16px;">
<table align="center">
<tr><td align="center"><h3><?php echo $nom; ?></h3></td></tr>
<tr>
<td align="center">
<script charset="utf-8" type="text/javascript" src="include/play.js">
</script>
<title>Lecteur de fichier</title>
<table border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle">
<OBJECT ID="MediaPlayer" width="0" height="0"
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
CODEBASE="http://activex.microsoft.com/activex/co ... =6,4,5,715"
STANDBY="Loading Microsoft® Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="AutoStart" VALUE="True">
<PARAM NAME="AnimationatStart" VALUE="False">
<PARAM NAME="ShowControls" VALUE="false">
<PARAM NAME="FileName" VALUE="<?php echo $rep.$che_nom; ?>">
<EMBED
PLUGINSPAGE="http://www.microsoft.com/isapi/redir.dl ... ediaPlayer'>
</EMBED>
</OBJECT>
</td>
</tr>
<tr>
<td align="center"><img src="image/cadre.jpg" width="131" height="41" border="0" usemap="#Controles"></td>
<JavaScript detectActiveXPlugIn(auto);>
<map name="Controles">
<area shape="rect" coords="24,10,62,34" href="#"onClick="javascript:mp_play();">
<area shape="rect" coords="70,10,112,34" href="#"onClick="javascript:mp_stop();">
</map>
</tr>
</table>
</tr>
<tr>
<td align="center">
<br><font style="font size:12pt; color:#009966;">Taille du fichier : <b><?php echo $deci; ?> Ko</b></font><br>
<font style="font size:10pt; color:#006699;">Date d'ajout : <?php echo $ajout;?></font>
<br><br><div align="center"style="border: 1px solid #ccc; padding: 8px; margin-bottom:16px;">
<!--REDIRECTION SUR PLAY PHP SI CLICK "TELECHARGER LE FICHIER" Variable a Transmettre a click.php =$fichier -->
<a href="clik.php?id=<?php echo $fichier; ?>"><font style="font size:12pt;"><b>Télécharger ce fichier </b>
</font><img border="0"src="image/telecharger.gif"></a><br><br>
<font style="font size:10pt; color:#006699;">Ce fichier a été téléchargé : <?php echo $clique; ?> fois.</font>
</div>
</td>
</tr>
<tr>
<td align="center"><a href="#" onClick="window.close()">Fermer la fenêtre</a></td>
</tr>
</td>
</table>
</div>
<?php redi();// FUNCTION redi() ?>
PLAY.js
var bWin32IE;
if ((navigator.userAgent.indexOf("IE") > -1) && (navigator.platform=="Win32")) {bWin32IE=true;} else {bWin32IE=false;}
function mp_play() {
if (bWin32IE==true) {
setTimeout("document.MediaPlayer.play()",100);
} else {
document.MediaPlayer.SetAutoStart(true);
document.MediaPlayer.Play();
}
}
function mp_stop() {
if (bWin32IE==true) {
document.MediaPlayer.Stop();
document.MediaPlayer.CurrentPosition=0;
} else {
document.MediaPlayer.Stop();
document.MediaPlayer.SetCurrentPosition(0);
}
}
Excusez moi pour la présentation du message.
J'avais fait un email avec fichiers attachés.
Mais je ne vois pas sur ce forum la possibilité de les envoyer?
Je vous ai indiqué le site de ce projet(pas d'accés moteur recherche)
Merci de votre avis
--------------------------------------------------------------------------------
Message envoyé avec : Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322)
Code : Tout sélectionner