VLC Web Plugin -- Subtitles -- UDP Stream

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
dooffas
New Cone
New Cone
Posts: 4
Joined: 21 Aug 2013 17:27

VLC Web Plugin -- Subtitles -- UDP Stream

Postby dooffas » 17 Oct 2013 18:39

I am streaming a live TV channel over UDP and to a webpage.
I am using VLCWebPlugin 2.0.8 Twoflower to display the stream.

Code: Select all

var vlc = document.getElementById("vlc_control"); var id = vlc.playlist.add("udp://@IPADDRESS", "vlcWindow"); vlc.playlist.playItem(id);
The video displays and streams fine, without issue. I am trying to use the subtitle track that is included in the stream. I have interrogated the stream and confirmed that a subtitle track is included within the stream.
I have also played the UDP stream in the VLC desktop client and the subtitles work.

Code: Select all

vlc.subtitle.crount; {returns "2"} vlc.subtitle.description(0); {returns "Disable"} vlc.subtitle.description(1); {returns "DVB subtitles - [English]"}
Originally I tried setting the subtitle track when loading the VLC object:

Code: Select all

var vlc = document.getElementById("vlc_control"); var id = vlc.playlist.add("udp://@IPADDRESS", "vlcWindow"); vlc.playlist.playItem(id); vlc.subtitle.track=1;
This however does not work, so after a lot of searching, it is suggested that a delay is used before the subtitles are initialised.

Code: Select all

var vlc = document.getElementById("vlc_control"); var id = vlc.playlist.add("udp://@IPADDRESS", "vlcWindow"); vlc.playlist.playItem(id); function subtitles(){ vlc.subtitle.track=1; console.log("Subtitle track set"); } function start(){ timeout = setTimeout(subtitles,6000); } <body onload=start()>
Unfortunately this still does not work. Does anyone have any insight in to this problem?

dooffas
New Cone
New Cone
Posts: 4
Joined: 21 Aug 2013 17:27

Re: VLC Web Plugin -- Subtitles -- UDP Stream

Postby dooffas » 21 Oct 2013 17:30

bump

dooffas
New Cone
New Cone
Posts: 4
Joined: 21 Aug 2013 17:27

Re: VLC Web Plugin -- Subtitles -- UDP Stream

Postby dooffas » 22 Oct 2013 14:37

After further investigation in to this problem it appears to be a bug in version 2.0.8 of the VLC - Mozilla plugin.

Where as the documentation suggests vlc.subtitle.track expects a subtitle track id, it in fact expects the subtitle pid.

I have raised this as a bug: https://trac.videolan.org/vlc/ticket/9715


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 18 guests