load subtitles/censor data in embeded player

This commit is contained in:
j 2012-02-17 14:27:21 +05:30
commit 7190568714
3 changed files with 90 additions and 40 deletions

View file

@ -3,7 +3,8 @@
pandora.ui.item = function() {
var that = Ox.Element();
var that = Ox.Element(),
videoOptions;
pandora.api.get({
id: pandora.user.ui.item,
@ -42,7 +43,7 @@ pandora.ui.item = function() {
if (['video', 'timeline'].indexOf(pandora.user.ui.itemView) > -1) {
// fixme: layers have value, subtitles has text?
var videoOptions = pandora.getVideoOptions(result.data);
videoOptions = pandora.getVideoOptions(result.data);
}
if (!result.data.rendered && [

View file

@ -794,7 +794,7 @@ pandora.getVideoOptions = function(data) {
pandora.site.video.resolutions.forEach(function(resolution) {
options.video[resolution] = Ox.range(data.parts).map(function(i) {
var part = (i + 1),
prefix = pandora.site.site.videoprefix.replace('PART', part); // fixme: '{part}' would be more consistent
prefix = pandora.site.site.videoprefix.replace('{part}', part);
return prefix + '/' + (data.item || pandora.user.ui.item) + '/'
+ resolution + 'p' + part + '.' + pandora.user.videoFormat;
});