Page 1 of 1

VLC embeds in html : "vlc.playlist is null" !?!?

Posted: 18 Jun 2015 23:59
by ilagi
Hi,
I'm trying to live-stream a http stream from a webcam on a website, so I need to set the network-caching to a low value.
I know that this can only be done via javascript, but unfortunately the latest VLC (v2.2.1) throws
'vlc.playlist' is null or not an object
on the vlc object.

It seems something is wrong with the current version of the VLC plugin.
Below is the html code I'm using:

Code: Select all

<html> <title>VLC plugin</title> <body> <embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2" width="1280" height="720" id="vlc" </embed> <script> var vlc = document.getElementById("vlc"); vlc.playlist.add("http://xxx.com:8080", "mystream", ":network-caching=10"); vlc.playlist.play(); </script> </body> </html>

Computer:
Windows 7, 64bit
VLC: v2.2.1
Browser: IE 8
VLC IE Add-in version: 2.2.1

Re: VLC embeds in html : "vlc.playlist is null" !?!?

Posted: 19 Jun 2015 12:57
by EdwinE
Ilagi i'm so going to steal your code :D it looks interesting enough to play with

Daft question perhaps. Why are you trying to stream audio from xxx.com which is a domain name registered to

Registrant Name: WGCZ s.r.o. WGCZ s.r.o.
Registrant Organization: Company
Registrant Street: Krakovska 1366/25,
Registrant City: Praha 1
Registrant State/Province: PRAHA
Registrant Postal Code: 11000
Registrant Country: Czech Republic
Registrant Phone: +420.222220348
Registrant Phone Ext:
Registrant Fax:
Registrant Fax Ext:
Registrant Email: domain.wgcz@webgroup-limited.com

Unless that's really you then i guess that'll be your issue.

Re: VLC embeds in html : "vlc.playlist is null" !?!?

Posted: 19 Jun 2015 14:45
by ilagi
Hi EdwinE,
Sorry, xxx.com is NOT my domain, I just changed the real domain name to this "dummy" one to protect the innocent. :-)

Any idea of the VLC add-in issue (javascript error: vlc.playlist is null)?

The video feed itself is fine, it plays in VLC in the browser if I change the above code to autoplay it. What I can't do is to add it to the playlist via javascript due to the "vlc.playlist is null" javascript error - hence my question.

Re: VLC embeds in html : "vlc.playlist is null" !?!?

Posted: 19 Jun 2015 21:29
by EdwinE
not really. check your pm in a few minutes.... mail the working & non working code to the email address you get & i look at it tomorrow. it's time to count sheep for me :D