diff --git a/static/pdf.js/links.js b/static/pdf.js/links.js index 108269cd..88944d90 100644 --- a/static/pdf.js/links.js +++ b/static/pdf.js/links.js @@ -24,21 +24,23 @@ function getEmbedURL(id, videoURL) { + '&in=' + inPoint + '&out=' + outPoint + '&paused=false&showCloseButton=true'; } - function getVideoOverlay(page) { - return (editable || links[page]) ? { + var links = embeds.filter(function(embed) { + return embed.page == page && embed.type =='inline'; + }); + return (editable || links.length) ? { beginLayout: function() { this.counter = 0; - //console.log('lets beging'); }, endLayout: function() { - //console.log('lets end it here'); }, appendImage: function(image) { var id = ++this.counter, - hasVideo = links[page] && links[page][id], + video = links.filter(function(embed) { + return embed.id == id; + })[0], $interface, $playButton, $editButton; - if (editable || hasVideo) { + if (editable || video) { $interface = Ox.$('