Skip to content

Commit

Permalink
chore: add example that uses TTML subtitles (#368)
Browse files Browse the repository at this point in the history
  • Loading branch information
gkatsev authored Sep 17, 2021
1 parent 3859998 commit 563aac6
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
<video id="angel-one-drm" width=600 height=300 class="video-js vjs-default-skin" controls></video>
<p>Livesim</p>
<video id="live-player" width=600 height=300 class="video-js vjs-default-skin" controls></video>
<p>Livesim - multi-subs</p>
<video id="live-subs-player" width=600 height=300 class="video-js vjs-default-skin" controls></video>
<script src="node_modules/video.js/dist/video.js"></script>
<script src="node_modules/dashjs/dist/dash.all.debug.js"></script>
<script src="dist/videojs-dash.js"></script>
Expand All @@ -39,7 +41,14 @@
playerOcean = videojs('player-ocean'),
angelOne = videojs('angel-one'),
angelOneDrm = videojs('angel-one-drm'),
livePlayer = videojs('live-player');
livePlayer = videojs('live-player'),
liveSubsPlayer = videojs('live-subs-player', {
html5: {
dash: {
useTTML: true
}
}
});

player.ready(function() {
player.src({
Expand Down Expand Up @@ -83,6 +92,13 @@
type: 'application/dash+xml'
});
});

liveSubsPlayer.ready(function(){
liveSubsPlayer.src({
src: 'https://livesim.dashif.org/dash/vod/testpic_2s/multi_subs.mpd',
type: 'application/dash+xml'
});
});
</script>
</body>

Expand Down

0 comments on commit 563aac6

Please sign in to comment.