Embeding VLC with subtitles (Can't get vlc.subtitle.track working)
Posted: 01 Dec 2015 12:54
Hi there,
Sorry if this has already been addressed.. i'm slightly over-reaching my technical ability and i may have mis-searched.. (though i have been looking).
I have a tv-headEnd server broadcasting a stream which i embed in a webpage with subtitles enabled. I came up with / discovered the following html which has worked fine up until 2.2.1 (it works in 2.2.0 at the very least) and i can't work out what im doing wrong.
The html is quite simple and looks like this:
Can anyone advise if it's simply my bad code which no longer works, or if this might be a bug in the latest (the the current nightly of 2.2.2) version, or possibly even a deprecated function? I'm thinking it's going to be my code.. but.. i'm stuck!
The timeout line was added because the plugin was prone to loading a black screen without it and that seemed to cause a refresh of the display and made it work.
Thanks in advance of any help and sorry if i'm in the wrong place or duplicating an existing post!!
Sorry if this has already been addressed.. i'm slightly over-reaching my technical ability and i may have mis-searched.. (though i have been looking).
I have a tv-headEnd server broadcasting a stream which i embed in a webpage with subtitles enabled. I came up with / discovered the following html which has worked fine up until 2.2.1 (it works in 2.2.0 at the very least) and i can't work out what im doing wrong.
The html is quite simple and looks like this:
Code: Select all
<html>
<head>
<title>VLC WebPlayer Start Subtitles and Mute Video on page load</title>
<script type="text/javascript">
function subtitles() {
var vlc = document.getElementById("vlc");
vlc.subtitle.track='505';
vlc.video.deinterlace.enable("blend")
}
function start(){
timeout = setTimeout(subtitles,1000);
}
</script>
</head>
<body bgcolor="#000000" onload=start()>
<object classid="clsid:9BE31822-FDAD-461B-AD51-BE1D1C159921" codebase="http://downloads.videolan.org/pub/videolan/vlc/latest/win32/axvlc.cab" width="100%" height="100%" id="vlc" events="True">
<param name="Src" value="http://username:password@hostname:9981/playlist/channelid/33" />
<param name="ShowDisplay" value="False" />
<param name="AutoLoop" value="False" />
<param name="Controls" value="False" />
<param name="AutoPlay" value="True" />
</object>
</body>
</html>
The timeout line was added because the plugin was prone to loading a black screen without it and that seemed to cause a refresh of the display and made it work.
Thanks in advance of any help and sorry if i'm in the wrong place or duplicating an existing post!!