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);
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]"}
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;
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()>