add getEmbedURL method

This commit is contained in:
rolux 2013-02-12 19:00:58 +05:30
parent cd0e09169d
commit 799657d4ec
1 changed files with 9 additions and 2 deletions

View File

@ -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) {