From 00990497857e5ec27405e2b795310fa0dc925545 Mon Sep 17 00:00:00 2001 From: Florian Larysch Date: Tue, 3 Jan 2017 01:43:04 +0100 Subject: relive: add scrubbing thumbnail support When the Relive manifest contains preview thumbnails for scrubbing, display them to the user. --- assets/js/lustiges-script.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'assets/js') diff --git a/assets/js/lustiges-script.js b/assets/js/lustiges-script.js index 81db426..e949c6e 100644 --- a/assets/js/lustiges-script.js +++ b/assets/js/lustiges-script.js @@ -23,10 +23,25 @@ $(function() { if($relivePlayer.length > 0) { var player = new Clappr.Player({ baseUrl: 'assets/clapprio/', + plugins: { + core: [ClapprThumbnailsPlugin] + }, + source: $relivePlayer.data('m3u8'), height: $relivePlayer.data('height'), width: $relivePlayer.data('width'), autoPlay: true, + scrubThumbnails: { + backdropHeight: 64, + spotlightHeight: 84, + thumbs: ClapprThumbnailsPlugin.buildSpriteConfig( + $relivePlayer.data("sprites"), + $relivePlayer.data("sprites-n"), + 160, 90, + $relivePlayer.data("sprites-cols"), + $relivePlayer.data("sprites-interval") + ), + }, events: { onReady: function() { var playback = player.getPlugin('hls'); -- cgit v1.2.3