Page 1 of 1

ActiveX Control in Java - SWT

Posted: 18 Jul 2005 13:57
by bernie35
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

Posted: 20 Jul 2005 10:06
by Quovodis
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

Posted: 23 Sep 2005 13:08
by thomasbielagk
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

Posted: 30 Mar 2006 08:40
by wuki22
Did you find a solution? I'm currently having the same problem.

Posted: 31 Mar 2006 11:04
by Quovodis
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.