vlc.playlist.add(url,name,options) fail in IE, FF is ok

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
karlar
Blank Cone
Blank Cone
Posts: 73
Joined: 12 Jun 2006 12:25

vlc.playlist.add(url,name,options) fail in IE, FF is ok

Postby karlar » 18 Jan 2007 14:21

Its seems like IE7 have not testet in IE6, but IE7 fails when trying to
execute vlc.playlist.add(mrl, name, options).
The Error i get from the browser is
TypeError Invalid procedure call or argument

In Firefox its just work

do anybody know why

The vlc.playlist.add(mrl) seems to work in IE and Firefox
but it would be nice to add some options to the playlist item

vlc.playlist.add(mrl) : add a playlist item as MRL (Multimedia Resource Locator). The MRL must be given as a string.

vlc.playlist.add(mrl,name,options) : add a playlist item as MRL (Multimedia Resource Locator), with metaname 'name' and options 'options'. All input values must be given as string.

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

Postby divx118 » 18 Jan 2007 17:45

I have ie7 and am using the function with succes.

Maurice

karlar
Blank Cone
Blank Cone
Posts: 73
Joined: 12 Jun 2006 12:25

Postby karlar » 19 Jan 2007 08:48

Hey divx118

The vlc.playlist.add(mrl, name, options) ?
Then I guess its me doing something wrong.

I have tried with

var options = new Array(":rtsp-tcp");
vlc.playlist.add("http://...url", "", options);

and with
vlc.playlist.add("http://...url", null, options)

with out luck do you have any secret :-)

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

Postby divx118 » 19 Jan 2007 18:22

I use the last one. The VLC Plugin test page does that work for you they are also using this function. Look here for that page.

So no secret at all :D .

Maurice

karlar
Blank Cone
Blank Cone
Posts: 73
Joined: 12 Jun 2006 12:25

Postby karlar » 20 Jan 2007 13:19

Yeah you right
Sorry about that, i was just convinced that it used the vlc.playlist.add(mrl),
dont know why i made that assumption well sorry about.

Spellcoder
Blank Cone
Blank Cone
Posts: 57
Joined: 19 Apr 2006 12:21
Location: Hengelo // The Netherlands
Contact:

Postby Spellcoder » 22 Jan 2007 11:47

Hey divx118

The vlc.playlist.add(mrl, name, options) ?
Then I guess its me doing something wrong.

I have tried with

var options = new Array(":rtsp-tcp");
vlc.playlist.add("http://...url", "", options);

and with
vlc.playlist.add("http://...url", null, options)

with out luck do you have any secret :-)
In the documentation of the API it says:
vlc.playlist.add(mrl,name,options) : add a playlist item as MRL (Multimedia Resource Locator), with metaname 'name' and options 'options'. All input values must be given as string.

( http://www.videolan.org/doc/play-howto/ ... l#id294468 )

So maybe it fails because you passed an array instead of a string?

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

Postby divx118 » 22 Jan 2007 13:19

No it works with an array. :)

I use it myself in ie7 in the testpage there also using an array. I think he messed up something else, but I gues it is working now or not Karlar?

Maurice 8)

c60
New Cone
New Cone
Posts: 1
Joined: 07 Nov 2007 16:15

Re: vlc.playlist.add(url,name,options) fail in IE, FF is ok

Postby c60 » 07 Nov 2007 16:23

I had the same thing here. It turns out the there is a conflic between the IE ActiveX plug-in and json.js.
Json.js will extend each javascript object with the function toJSONString(). If this function is added to the vlc plugin object, a call to vlcObject.add(url, name, options) will fail, displaying the message "Error: Invalid procedure call or argument".

I tried to remove the function from the vlc plugin object by calling

Code: Select all

vlcObject.toJSONString = null
and

Code: Select all

delete vlcObject.toJSONString
The function was gone, but the error stayed. So I commented out the all the <object>.prototype.toJSONString prototypes from the json.js file and that worked.

--
Johan van Mol


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 9 guests