This commit is contained in:
rolux 2012-02-17 09:14:58 +00:00
commit 9770eefcd4
6 changed files with 14 additions and 7 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 && [
@ -240,6 +241,7 @@ pandora.ui.item = function() {
cuts: result.data.cuts || [],
duration: result.data.duration,
enableDownload: pandora.site.capabilities.canDownloadVideo[pandora.user.level] >= result.data.rightslevel,
enableImport: pandora.site.capabilities.canImportAnnotations[pandora.user.level],
enableSubtitles: pandora.user.ui.videoSubtitles,
find: pandora.user.ui.itemFind,
getFrameURL: function(position) {

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;
});