Page 1 of 1

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

Posted: 18 Jan 2007 14:21
by karlar
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.

Posted: 18 Jan 2007 17:45
by divx118
I have ie7 and am using the function with succes.

Maurice

Posted: 19 Jan 2007 08:48
by karlar
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 :-)

Posted: 19 Jan 2007 18:22
by divx118
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

Posted: 20 Jan 2007 13:19
by karlar
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.

Posted: 22 Jan 2007 11:47
by Spellcoder
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?

Posted: 22 Jan 2007 13:19
by divx118
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)

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

Posted: 07 Nov 2007 16:23
by c60
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