Skip to content

Commit 563aac6

Browse files
authored
chore: add example that uses TTML subtitles (#368)
1 parent 3859998 commit 563aac6

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

index.html

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@
2323
<video id="angel-one-drm" width=600 height=300 class="video-js vjs-default-skin" controls></video>
2424
<p>Livesim</p>
2525
<video id="live-player" width=600 height=300 class="video-js vjs-default-skin" controls></video>
26+
<p>Livesim - multi-subs</p>
27+
<video id="live-subs-player" width=600 height=300 class="video-js vjs-default-skin" controls></video>
2628
<script src="node_modules/video.js/dist/video.js"></script>
2729
<script src="node_modules/dashjs/dist/dash.all.debug.js"></script>
2830
<script src="dist/videojs-dash.js"></script>
@@ -39,7 +41,14 @@
3941
playerOcean = videojs('player-ocean'),
4042
angelOne = videojs('angel-one'),
4143
angelOneDrm = videojs('angel-one-drm'),
42-
livePlayer = videojs('live-player');
44+
livePlayer = videojs('live-player'),
45+
liveSubsPlayer = videojs('live-subs-player', {
46+
html5: {
47+
dash: {
48+
useTTML: true
49+
}
50+
}
51+
});
4352

4453
player.ready(function() {
4554
player.src({
@@ -83,6 +92,13 @@
8392
type: 'application/dash+xml'
8493
});
8594
});
95+
96+
liveSubsPlayer.ready(function(){
97+
liveSubsPlayer.src({
98+
src: 'https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd',
99+
type: 'application/dash+xml'
100+
});
101+
});
86102
</script>
87103
</body>
88104

0 commit comments

Comments
 (0)