Page 1 of 1

Problems with streaming and playlist

Posted: 28 Apr 2009 20:09
by snat
Hi! I'm new here and I have to say thank you, because I'm learning a lot with this forum :)

Now my problem. I'm trying to do a web for IP TV (streaming different channels). I saw an example from revolunet, and I modified it with my options. It works well at the beginning, but when I want to change the channel, it still plays the first one. I read that is a bug in the last versions of the plugin, and it's not fixed yet. I also read that it can be solved with playlists, but I can't do it works...

This is my code:

Code: Select all

<div id="content"> <body> <center> <h1>Prueba de TV IP</h1> <!-- título de la página --> <p><br/><a href="plugin.php?url=http://vthr.videolan.org/~dionoea/vlc-plugin-demo/streams/sw_3M.mov&width=320&height=180&plugin=mozilla">Haz click aquí si utilizas firefox.</a></p> <!-- ACTIVEX --> <!-- ACTIVEX --> <!-- ACTIVEX --> <!-- ACTIVEX --> <!-- <table> <tr><td colspan="2"> --> <body bgcolor="ffffcc"> </body> <!-- color de fondo --> <!-- <body background="/prueba.jpg"> <center> --> <!-- Insert VideoLAN.VLCPlugin.1 activex control --> <!-- pantalla de visualizacion --> <object classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="600" height="440" id="vlc" events="True"> <param name="Src" value="" /> <param name="ShowDisplay" value="True" /> <param name="Loop" value="False" /> <param name="AutoPlay" value="False" /> </object> </td></tr> <tr><td> </td><td width="15%"> <div id="info" style="text-align:center"></DIV> <tr><td colspan="2"> <input type=button id="PlayOrPause" value=" Play " onClick='doPlayOrPause()'> <input type=button value="Stop" onClick='document.vlc.stop();'> <input type=button value="Mute" onClick='document.vlc.toggleMute();'> <input type=button value="Tele5" onClick='doGo("rtp://@225.0.0.1:1234")';'> <input type=button value="FDF" onClick='doGo("rtp://@225.0.0.2:1234")';'> <input type=button value="refresh" onClick="history.go(0)"> </td></tr> </table> <script LANGUAGE="JScript"> <!-- function onPlay() { document.getElementById("PlayOrPause").value = "Pause"; }; function onPause() { document.getElementById("PlayOrPause").value = " Play "; }; function onStop() { document.getElementById("PlayOrPause").value = " Play "; }; function doGo(targetURL) { var options = new Array(":input-repeat=1"); document.vlc.addTarget(targetURL, options, 8, 0); doPlayOrPause(); document.vlc.stop(); document.vlc.playlistClear(); }; function doPlayOrPause() { if( document.vlc.playing ) { document.vlc.pause(); } else { document.vlc.play(); } }; function vlc::play() { onPlay(); }; function vlc::pause() { onPause(); }; function vlc::stop() { onStop(); }; //--> </script> </div>
I If refresh the page (hisroty.go), it works, but if I do it in one button (refresh and change the stream in one action or with pause), it doesn't work (javascript problems)...Can anyone help me or give me any idea?
Thanks in advance :D