From b6fccae84afdbddabe471d209f4ec53e27ccd601 Mon Sep 17 00:00:00 2001 From: Sanj Date: Mon, 21 Feb 2011 22:06:27 +0100 Subject: [PATCH] fixed --- padma.layers.js | 10 ++++++++-- utils.js | 7 ++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/padma.layers.js b/padma.layers.js index 9abe328..ffb6e42 100644 --- a/padma.layers.js +++ b/padma.layers.js @@ -1,8 +1,8 @@ var padmaConfig = { 'background': 'rgba(0,0,0,0.85)', 'color': '#fff', - 'links_url': 'http://padma.okno.be/', - 'data_url': 'http://padma.okno.be/', + 'links_url': 'pad.ma/', + 'data_url': 'http://pad.ma/', // 'links_url': 'http://pad.ma/', // 'data_url': 'http://pad.ma/', 'default_layers': ['transcript', 'description'], @@ -60,9 +60,15 @@ padmaVideo.prototype.getVideo = function(tc, size) { return this.video.urls[size] + "?t=npt:" + tc; } +/* padmaVideo.prototype.getLayerVideo = function(tcIn, tcOut) { return BASE_URL + this.id + "/download/" + tcIn + "-" + tcOut + ".ogv"; } +*/ + +padmaVideo.prototype.getLayerVideo = function(tcIn, tcOut) { + return this.video.urls['320'] + "?t=" + tcIn + "/" + tcOut; +} padmaVideo.prototype.noop = function() { // console.log("I'm done:)"); diff --git a/utils.js b/utils.js index fc0ac58..878e947 100644 --- a/utils.js +++ b/utils.js @@ -92,9 +92,10 @@ Gives a bunch of data parsed from a pad.ma url */ function parsePadmaUrl(link, padma_url) { -// console.log(padma_url); - var linkStr = link.replace(padma_url, ""); -// console.log(linkStr); + console.log(padma_url); + var regex = new RegExp("http://.*" + padma_url); + var linkStr = link.replace(regex, ""); + console.log(linkStr); // console.log(linkStr); var r = { }; r.url = link;