set api end-point explicitly to https and video base to http, only way work in chrome and ff, fix soon

This commit is contained in:
Sanj 2012-07-09 13:07:14 +05:30
parent 5e9f216540
commit 9e798c6d30

View File

@ -36,7 +36,7 @@
'id': 'ABC', //FIXME: throw an error if id is undefined at this point
'layers': ['transcripts', 'descriptions', 'keywords', 'places'],
'keys': ['layers'], //data keys to fetch from API call. FIXME: add more apt keys
'api': "//pad.ma/api/", //pandora instance api end-point - see http://pad.ma/api
'api': "https://pad.ma/api/", //pandora instance api end-point - see http://pad.ma/api
'in': 0, //in point (float, in seconds) of clip
'out': 0, //out point of clip
'pandora_base': 'pad.ma/', //pandora instance from where to fetch video and image data
@ -50,7 +50,8 @@
$loading = $('<div />').addClass("pandoraLoading").text("Loading video...").appendTo($this),
sendData = JSON.stringify({'id': id, 'keys': opts.keys});
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
//get the pandora id and instantiate a pandoraVideo object with the current element and render it and execute optional callback
console.log(opts.api);
var deferred = $.post(opts.api, {'action': opts.action, 'data': sendData}, function(response) {
$loading.hide().remove();
var pandora = new PandoraVideo(id, response.data, $this, opts);
@ -81,7 +82,7 @@
this.annotPoint = -1;
this.getVideoURL = function() {
var rand = parseInt(Math.random() * 10000);
return "//video" + rand + "." + opts.pandora_base + id + "/" + opts.resolution + ".webm";
return "http://video" + rand + "." + opts.pandora_base + id + "/" + opts.resolution + ".webm";
};
//empties element, appends video widget