Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add example that uses TTML subtitles #368

Merged
merged 1 commit into from
Sep 17, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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