Bonjour,
Je débute en JavaScript, et je cherche à passer via une variable un chemin d'accès à une vidéo afin que celle ci soit lue dans une page web via un objet mmplayer.
Voici le code qui fonctionne sans la variable :
Code html : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9 <OBJECT ID="MMPlayer"WIDTH="320" HEIGHT="300" classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab# Version=5,1,52,701" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <PARAM NAME="Filename" VALUE="\\frdd01\_video\test.mp4"> <PARAM NAME="ShowControls" VALUE="1"> <PARAM NAME="ShowStatusBar" VALUE="0"> <PARAM NAME="ShowDisplay" VALUE="0"> <PARAM NAME="DefaultFrame" VALUE="Slide"> <PARAM NAME="Autostart" VALUE="0"> </OBJECT>
Dans mon exemple, j'aimerai donc que \\frdd01\_video\test.mp4 soit dans une variable.
J'ai essayé avec la propriété suivante, mais rien y fait.
Est ce quelqu’un pourrait m'aider ?
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4 function play(){ dim path="\\frdd01\_video\test.mp4"; document.MMPlayer.filename=path; }
Merci d'avance.






Répondre avec citation
Partager