Meet npm Pro: unlimited public & private packages + package-based permissions.Learn more »

zombiebox-extension-ui-subtitles

0.1.1 • Public • Published

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);
            });
    

Keywords

none

Install

npm i zombiebox-extension-ui-subtitles

DownloadsWeekly Downloads

2

Version

0.1.1

License

none

Last publish

Collaborators

  • avatar
  • avatar