Page 1 of 1

Embedding VLC ActiveX in WIndows Sidebar Gadget

Posted: 09 Oct 2007 15:31
by newimagenio
Hello:
First of all excuse my Engiish but I currently speak Spanish.
I'm trying to make a Sidebar Gadget with the VLC ActiveX but my code does not work. It seems the ActiveX is not loaded into the gadget although it works fine as a standalone web page. The scripting is very simple:

Code: Select all

<HTML><HEAD> <script> function doGo(targetURL) { var vlc = document.getElementById("vlc"); vlc.playlist.clear(); vlc.playlist.add(targetURL); vlc.playlist.play(); } </script> </HEAD> <body style="width:130px;height:120px;font-family:Tahoma;font-size:7pt;"> <INPUT size="6" id="targetTextField" value="sample.mp4" NAME="targetTextField"> <INPUT type=submit value="Go" onClick="doGo(document.getElementById('targetTextField').value);" ID="Submit1" NAME="Submit1"> <OBJECT classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab#Version=0,8,6,0" width="120" height="80" id="vlc" events="True" VIEWASTEXT> <param name="MRL" value="" /> <param name="ShowDisplay" value="True" /> <param name="AutoLoop" value="False" /> <param name="AutoPlay" value="False" /> <param name="Volume" value="50" /> <param name="StartTime" value="0" /> </OBJECT> </BODY></HTML>
I have tried with this other code:

Code: Select all

<HTML> <head> <script> function go() { document.getElementById("texto").value="adios"; loadControl(); } function stop() { vlc.playlist.stop(); } function loadControl() { var vlc = new ActiveXObject("VideoLAN.VLCPlugin.2"); vlc.MRL="sample.mp4"; vlc.playlist.play(); document.getElementById("texto").value= vlc.playlist.isPlaying; } </script> </head> <body style="width:130px;height:120px;font-family:Tahoma;font-size:7pt;"> <INPUT type="button" value="Go" onClick="go();"> <INPUT type="button" value="Stop" onClick="stop();"> <INPUT type="text"id="texto" value=""> <br> </BODY> </HTML>
In this case, the ActiveX Control is loaded in both, the standalone page and the Gadget, but the display does not appear and I can not watch or hear the movie.


I have read that in order to get an ActiveX working in Gadgets, they mut be trust-signed. Is that true?
Any ideas?

Regards