activeX 0.8.6 get/setVariable

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

activeX 0.8.6 get/setVariable

Postby divx118 » 27 Dec 2006 19:32

Is the get/setVariable dropped in the new activeX?
I use the following but it doesn't work.
var vlc = document.getElementById("vlc")
var x = vlc.getVariable("key-fullscreen");
vlc.setVariable("key-pressed", x)
I am rewriting my VLC plugin for MCE and it would be great to handle some hotkey functions from javascript.
If it doesn't work anymore I will find some other way.

Maurice :)

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Postby Tappen » 28 Dec 2006 01:48

The ActiveX control still supports the IVLCControl interface, it's just that the IVLCControl2 interface is now the default you get when you create the object. I'm not sure how you'd get Javascript to do the QueryInterface on the ActiveX object to give you the old interface to call though, sorry.

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Postby divx118 » 28 Dec 2006 18:40

Thanks for the reply,

Would it be possible to use both interfaces at the same time or do i have to stick to one?
I will see if i get the old interface to work in javascript.

Maurice :)

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Postby divx118 » 29 Dec 2006 17:54

The ActiveX control still supports the IVLCControl interface, it's just that the IVLCControl2 interface is now the default you get when you create the object. I'm not sure how you'd get Javascript to do the QueryInterface on the ActiveX object to give you the old interface to call though, sorry.
I did some testing, but I think it will not work if you want the old interface on the new object.
What I did find out that you can use the getVariable() if you create a new activeXobject like the following.
var vlcOld=new ActiveXObject("VideoLAN.VLCPlugin.1");
function getVariableVLC(parString)
try {
var x = vlcOld.getVariable(parString);
return x;
}
catch (e)
{
alert(e+" : "+e.description)
getVariableVLC(parString)
}
You will see that the second time the correct value will return. At least that was the case on my machine. Maybe it will be of some use to someone.
I will see if i find some other way to call my needed vlc-functions, because i don't want to use the old object it is sometimes a little unstable.

Maurice :)

Tappen
Cone that earned his stripes
Cone that earned his stripes
Posts: 150
Joined: 30 Oct 2006 07:55

Postby Tappen » 31 Dec 2006 05:53

I found this on the M$ website:
The Default Interface

Every public member (any member not marked as private or friend) of a class is part of that class's default interface.

Important things to note about default interfaces:

1. The default interface of a class is the only interface that scripting languages can access.
2. The default interface of a class is the only one that can be late bound to. If you assign a reference of your object to a variable that is a variant or object (for example, Dim x as Object) and class a method off that variable, late binding is used.

Points 1 and 2 are actually stating the same thing (because VBScript and JavaScript languages use variants and only support late binding).

Public members of a class are members of the default interface. The default interface supports early and late binding by consumers of the class.

http://msdn.microsoft.com/library/defau ... dvbcom.asp
So no, you can't get the old interface from the new object with Javascript. They'll have to add the functions to the new interface.

divx118
Blank Cone
Blank Cone
Posts: 95
Joined: 22 Jun 2006 18:19

Postby divx118 » 31 Dec 2006 10:53

:) Thanks Tappen for the answer.

Maurice

nayanvora
New Cone
New Cone
Posts: 2
Joined: 04 Apr 2007 06:05
Contact:

getVariable

Postby nayanvora » 02 May 2007 14:53

Hi there,

Is there any way that i can get the list of title , chapters, tracks etc details using getVariable from any dvd ?

or how can i use getVariable to get the data from currently running dvd ?

nayan_vora@yahoo.com


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 3 guests