From 0743376917f46ed890395245ffa37e8a2f4c72e0 Mon Sep 17 00:00:00 2001 From: j Date: Fri, 13 Apr 2018 14:21:33 +0200 Subject: [PATCH] add volume/loop to embed options --- static/js/embedPlayer.js | 5 ++++- static/js/utils.js | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/static/js/embedPlayer.js b/static/js/embedPlayer.js index 3343c798..0db6a7b8 100644 --- a/static/js/embedPlayer.js +++ b/static/js/embedPlayer.js @@ -11,6 +11,7 @@ pandora.ui.embedPlayer = function() { annotationsRange: ui.annotationsRange, annotationsSort: ui.annotationsSort, invertHighlight: true, + loop: false, matchRatio: false, paused: true, playInToOut: true, @@ -21,6 +22,7 @@ pandora.ui.embedPlayer = function() { }), showTimeline: false, timeline: ui.videoTimeline, + volume: ui.videoVolume, width: window.innerWidth }, options = getOptions(), @@ -29,6 +31,7 @@ pandora.ui.embedPlayer = function() { $innerPanel, $outerPanel, $title, $player, $controls, $timeline, $annotations; + pandora.api.get({id: ui.item, keys: pandora.VIDEO_OPTIONS_KEYS}, function(result) { if (removed) { return; @@ -120,7 +123,7 @@ pandora.ui.embedPlayer = function() { ? pandora.site.timelines : [], title: video.title, video: video.video, - volume: ui.videoVolume, + volume: options.volume, width: options.width }, options['in'] ? { 'in': options['in'] diff --git a/static/js/utils.js b/static/js/utils.js index 12d212ae..19fce25a 100644 --- a/static/js/utils.js +++ b/static/js/utils.js @@ -1373,12 +1373,13 @@ pandora.getFoldersWidth = function(section) { }; pandora.getHash = function(state, callback) { + // FIXME: remove this var embedKeys = [ 'annotationsRange', 'annotationsSort', 'embed', 'ignoreRights', 'invertHighlight', 'matchRatio', - 'paused', 'playInToOut', + 'paused', 'playInToOut', 'loop', 'volume', 'showAnnotations', 'showCloseButton', 'showLayers', 'showTimeline', 'timeline', 'title' ],