Page 1 of 1

Set/Get Volume in Javascript for the ActiveX-plugin fails ??

Posted: 17 Jan 2006 02:13
by maersk
Hi.

I'm trying to set and get the volume of the VLC ActiveX plugin but it seems to fail in IE.

I'm embedding the object as shown below. The player plays nicely, but trying to get the volume (in a javascript section) using on of the following methods fails

--------------------------------------------
volume = document.vlc.Volume();
volume = document.vlc.volume();
volume = document.vlc.getvolume();
volume = document.vlc.getVolume();
volume = document.vlc.Getvolume();
volume = document.vlc.GetVolume();
volume = document.vlc.get_volume();
volume = document.vlc.get_Volume();
volume = document.vlc.Get_volume();
volume = document.vlc.Get_Volume();
--------------------------------------------

Am I a fool trying to get the volume out of a ActiveX component trying to use javascript ?

Kind regards

--PMM

The object code

<object id="vlc"
name="vlc"
classid="clsid:E23FE9C6-778E-49D4-B537-38FCDE4887D8"
codebase="https://downloads.videolan.org/pub/vide ... /axvlc.cab"
type="application/x-vlc-plugin"
width="100%"
height="100%"
events="True">
<param name="Src" value="rtsp://myserver/myfile"/>
<param name="ShowDisplay" value="True"/>
<param name="Loop" value="False"/>
<param name="AutoPlay" value="True"/>
</object>

Posted: 17 Jan 2006 09:47
by tonsofpcs
Not sure about JavaScript, but you may want to have a look here: http://wiki.videolan.org/index.php/ActiveX

Re: Set/Get Volume in Javascript for the ActiveX-plugin fail

Posted: 18 Jan 2006 01:36
by maersk
Yep, saw the list, but it merely/mostly mention VB-implementation.

There is also the http://trac.videolan.org/vlc/file/trunk ... README.TXT

Nevertheless, setting and gettign the volume only produces an erroe.

Tried also

volume = document.vlc.getVariable('Volume');

but that fails too with IE.

Seems to me like you can't set/get the volume of VLC in javascript when embedding it as an ActiveX-object. Clearly that must be a mistake.

Kind regards.

--PMM

Posted: 18 Jan 2006 10:56
by tonsofpcs
I don't claim to be a javascript expert, but try the following:
volume = document.vlc.volume;
or
volume = document.vlc.Volume;