ActiveX Control in Java - SWT

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
bernie35

ActiveX Control in Java - SWT

Postby bernie35 » 18 Jul 2005 13:57

Hi Folks,

I have some problems using VLC as ActiveX controls in Java ..
(everything works ok within IE!! - same machine).

I think I do something wrong when adding a target ..,
I googled a while, but I cannot found any solution, which TYPEs to use

What I do now is the following ..

Code: Select all

Variant opt = new Variant(":input-repeat"); Variant[] vars = new Variant[]{new Variant(uri), opt, new Variant(4+8), new Variant(-666) }; automation.invoke(OCX_ID_ADD_TARGET, vars);
afterwards VLC does shows, but doesn't play the target !!!
Is it easier to use the 'src' parameter instead of 'addTarget' !?!?

I hope S.O. could help me out ..

Greets,

Bernie

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 20 Jul 2005 10:06

is there any reasons why you are using the ActiveX plugin and not the java binding for VLC ?

anyway to answer your question.

the 'src' parameter inserts a MRL into the default playlist, just like addTarget, and 'autplay' plays it when the plugin is displayed, so yes you can use it rather than the addTarget()

the type problem you are having comes from the opt argument which takes an array of strings and not a single string, hence I would assume that you would use

Variant opt = new Variant( new String[] { ":input-repeat=0" } )

alternatively you may also use null for this argument since it is optional

thomasbielagk

Postby thomasbielagk » 23 Sep 2005 13:08

There is IMHO no way constructing a Variant containing a String Array.

But it works with an empty Variant.

Code: Select all

Variant[] vars = new Variant[]{new Variant(uri),new Variant(),new Variant(4+8), new Variant(-666)};
I didn't find a way to pass arguments in second param so far.

Thom

wuki22
New Cone
New Cone
Posts: 3
Joined: 30 Mar 2006 08:32

Postby wuki22 » 30 Mar 2006 08:40

Did you find a solution? I'm currently having the same problem.

Quovodis
Cone that earned his stripes
Cone that earned his stripes
Posts: 271
Joined: 16 Jun 2004 11:13
Location: Cork, Ireland

Postby Quovodis » 31 Mar 2006 11:04

I dont know what version of Java you are using, but you should be able to pass the options for addTarget into a SafeArray object, which in turn is inserted into a variant.


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 18 guests