zombiebox-extension-ui-subtitles
v0.1.1
Published
Zombiebox Subtitles player -------
Downloads
7
Readme
Zombiebox Subtitles player
Supported subtitle formats
- srt
Usage
/** @type {string} *./
var srtUrl = '';
/** @type {zb.device.IVideo} */
var player = getVideoPlayer();
var subtitlesPlayer = new zb.ui.subtitles.Player();
// append subtitles player dom to current scene
thisScene.getContainer().appendChild(subtitlesPlayer.getContainer());
// load subtitles file
subtitlesPlayer.loadSubtitlesFromUrl(srtUrl)
.then(function() {
// bind video player to subtitles player
subtitlesPlayer.setVideo(player);
});