soad029 | Salut tout le monde !! Voilà, je souhaite afficher dans une page HTML un fichier vidéo avec une barre de défilement sous celle-ci. Pour l'instant tout marche, sauf que ma barre de défilement apparait bien, mais ne défile pas, elle reste static. Je pense qu'il doit y avoir une petite erreur dans mon code
Code :
- <?
- include_once("../includePHP/include.php" );
- $URL = $HTTP_GET_VARS['url'];
- //echo $URL;
- ?>
- <script language='javascript' for='window' event='onLoad()'>
- VWDisplay.LoadWinSock2();
- </script>
- <script language='javascript' for='VWDisplay' event='Connect(SourceId, Type)'>
- VWDisplay.Resume(2);
- </script>
- <script>
- var timing;
- function Curseur(){
- slider.value=VWDisplay.GetFrame();
- timm.innerHTML=slider.value;
- }
- var timing;
- var playing=0;
- var muting=0;
- function Playit(){
- if(playing==0){
- idcam=VWDisplay.AddSource("file://c://CHU.ASF" );
- //idcam=VWDisplay.AddSource("file://<?echo $URL?>" );
- VWDisplay.SetActiveSourceId(idcam);
- VWDisplay.ConnectId(idcam,VWDisplay.GetSourceType(idcam), 0, 2000);
- VWDisplay.Resume(3);
- slider.Max=VWDisplay.GetTotalFrames();
- slider.Enabled=1;
- resetsound();
- resetvideo();
- timing=window.setInterval("Timer()",100);
- }else if(playing==1){
- window.clearInterval(timing);
- VWDisplay.pause(3);
- buttonPausePlayng.style.width=0;
- buttonPlayFilm.style.width=35;
- playing=2;
- }else if(playing==2){
- if(muting==1){
- VWDisplay.resume(2);
- }
- else{
- VWDisplay.resume(3);
- }
- timing=window.setInterval("Timer()",100);
- timing=window.setInterval("Curseur()",100);
- resetvideo();
- }
- }
- function Stopit(){
- playing=0;
- sid = VWDisplay.GetActiveSourceId();
- VWDisplay.RemoveSourceId(sid);
- window.clearInterval(timing);
- resetsound();
- buttonPausePlayng.style.width=0;
- buttonPlayFilm.style.width=35;
- Tempo.innerHTML=" ";
- }
- //Function qui renvoie le temps en MM:SS et qui prend le temps en Sec
- function convertime(tmpsec){
- var nbmin=Math.floor(tmpsec/60);
- var nbsec= Math.floor(tmpsec-(nbmin*60));
- if(nbmin<=0)
- totaltime="00";
- else if(nbmin<10)
- totaltime="0"+nbmin;
- else
- totaltime=nbmin;
- totaltime+=" : ";
- if(nbsec<=0)
- totaltime+="00";
- else if(nbsec<10)
- totaltime+="0"+nbsec;
- else
- totaltime+=nbsec;
- return totaltime;
- }
- function Timer(){
- if(Math.floor(VWDisplay.GetTime())==Math.floor(VWDisplay.GetTotalTime()))
- Stopit();
- else
- Tempo.innerHTML=convertime(VWDisplay.GetTime());
- }
- function Muteit(){
- if(muting==0){
- VWDisplay.pause(1);
- buttonMutePlayng.style.width=0;
- buttonSoundPlayng.style.width=20;
- muting=1;
- }else{
- VWDisplay.resume(1);
- resetsound();
- }
- }
- function resetsound(){
- buttonSoundPlayng.style.width=0;
- buttonMutePlayng.style.width=20;
- muting=0;
- }
- function resetvideo(){
- playing=1;
- buttonPausePlayng.style.width=35;
- buttonPlayFilm.style.width=0;
- }
- </script>
- <body class="body">
- <center>
- <br><br><br>
- <? echo GetActiveXReDisplay(1,1); ?>
- <table border=0 cellpadding=0 cellspacing=0 width="360" height="38" background="../images/bande.gif">
- <tr>
- <td width="10"> </td>
- <td width="35">
- <? echo $buttonPlayFilm->GetHTMLButtonCode("width:35;vertical-align: middle;","onClick=Playit()" ) ?><? echo $buttonPausePlayng->GetHTMLButtonCode("width:0;vertical-align: middle;","onClick=Playit()" ) ?>
- </td>
- <td width="3"></td>
- <td width="38">
- <? echo $buttonStopPlayng->GetHTMLButtonCode("width:25;vertical-align: middle;","onClick=Stopit()" ) ?>
- </td>
- <td width="15"> </td>
- <td width="60">
- <? echo $buttonMutePlayng->GetHTMLButtonCode("width:20;vertical-align: middle;","onClick=Muteit()" ) ?><? echo $buttonSoundPlayng->GetHTMLButtonCode("width:0;vertical-align: middle;","onClick=Muteit()" ) ?>
- </td>
- <td> </td>
- <td width="40" align="left" valign="bottom" id="Tempo" class="textViolet"></td>
- <object classid="clsid:F08DF954-8592-11D1-B16A-00C0F0283628" id=slider class="red" width=360 height=30 >
- <param name="color" value="red">
- <param name="_ExtentX" value="2646">
- <param name="_ExtentY" value="1111">
- <param name="_Version" value="393216">
- <param name="BorderStyle" value="0">
- <param name="MousePointer" value="0">
- <param name="Enabled" value="0">
- <param name="OLEDropMode" value="0">
- <param name="Orientation" value="0">
- <param name="LargeChange" value="5">
- <param name="SmallChange" value="1">
- <param name="Min" value="0">
- <param name="Max" value="100">
- <param name="SelectRange" value="0">
- <param name="SelStart" value="0">
- <param name="SelLength" value="0">
- <param name="TickStyle" value="3">
- <param name="TickFrequency" value="1">
- <param name="Value" value="0">
- <param name="TextPosition" value="0">
- </object>
- <script language='javascript' for='slider' event='Scroll()'>
- window.clearInterval(timing);
- VWDisplay.SeekFrame(this.value);
- timing=window.setInterval("Curseur()",100);
- </script>
- </tr>
- </table>
- </center>
- </body>
|
Si quelqu'un voit d'ou ça vient, ce serait super. Un grand merci en tout cas, et bonne journée ! |