Feature #1020 » vlc_test.html
1 |
<html>
|
---|---|
2 |
|
3 |
<script type="text/javascript"> |
4 |
var numSubtitles = 0; |
5 |
function getNumSubtitles() { |
6 |
numSubtitles = document.video1.subtitle.count; |
7 |
}
|
8 |
|
9 |
function initSubtitles() { |
10 |
while (document.video1.input.state != 3) { |
11 |
setTimeout(null, 100); |
12 |
}
|
13 |
getSubtitles(); |
14 |
}
|
15 |
|
16 |
function getSubtitles() { |
17 |
getNumSubtitles(); |
18 |
if (numSubtitles > 0) { |
19 |
for (var i=0; i<numSubtitles; i++) { |
20 |
var subtitleName = document.video1.subtitle.description(i) |
21 |
document.getElementById('subs').innerHTML += '<a href=\"javascript:;\" onclick=\'document.video1.subtitle.track=' + i + '\'>Subtitle ' + subtitleName + '</a><br>'; |
22 |
}
|
23 |
}
|
24 |
}
|
25 |
</script>
|
26 |
|
27 |
<head><title>Tvheadend + VLC subtitle test</title></head> |
28 |
|
29 |
<body onLoad='initSubtitles()'> |
30 |
|
31 |
<h1>Tvheadend + VLC subtitle test</h1> |
32 |
|
33 |
<embed type="application/x-vlc-plugin" |
34 |
name="video1" |
35 |
autoplay="yes" loop="no" width="400" height="300" |
36 |
target="http://192.168.10.7:9981/stream/channelid/22" /> |
37 |
<br /> |
38 |
<a href="javascript:;" onclick='document.video1.play()'>Play video1</a> |
39 |
<a href="javascript:;" onclick='document.video1.pause()'>Pause video1</a> |
40 |
<a href="javascript:;" onclick='document.video1.stop()'>Stop video1</a> |
41 |
<a href="javascript:;" onclick='document.video1.fullscreen()'>Fullscreen</a> |
42 |
|
43 |
<br>
|
44 |
|
45 |
<p id="subs"> </p> |
46 |
|
47 |
</body>
|
48 |
</html>
|