diff --git a/static/videoOverlay.js b/static/videoOverlay.js index fd4502f..d81f659 100644 --- a/static/videoOverlay.js +++ b/static/videoOverlay.js @@ -11,8 +11,15 @@ window.addEventListener('message', function(event) { } }); -function getEmbedUrl(id, videoUrl) { - return ''; +function getEmbedURL(id, videoURL) { + var parsed = Ox.parseURL(videoURL), + parts = parsed.pathname.split('/'), + item = parts[1], + points = parts[parts.length - 1].split(','), + outPoint = points.pop(), + inPoint = points.pop(); + return parsed.origin + '/' + item + '/embed?view=player&id=' + id + + '&in=' + inPoint + '&out=' + outPoint + '&showCloseButton=true'; } function getVideoOverlay(page) {