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

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
ilagi
New Cone
New Cone
Posts: 6
Joined: 02 Aug 2014 18:25

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

Postby ilagi » 18 Jun 2015 23:59

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

EdwinE
Blank Cone
Blank Cone
Posts: 17
Joined: 12 Jun 2015 09:34

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

Postby EdwinE » 19 Jun 2015 12:57

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.

ilagi
New Cone
New Cone
Posts: 6
Joined: 02 Aug 2014 18:25

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

Postby ilagi » 19 Jun 2015 14:45

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.

EdwinE
Blank Cone
Blank Cone
Posts: 17
Joined: 12 Jun 2015 09:34

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

Postby EdwinE » 19 Jun 2015 21:29

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


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests