use new api of oxjs video widgets (timeline types)

This commit is contained in:
rolux 2012-04-18 07:45:17 +00:00
parent 750a7965f7
commit b1c3af091b
4 changed files with 28 additions and 14 deletions

View file

@ -24,11 +24,13 @@ pandora.ui.editor = function(data) {
getFrameURL: function(position) {
return '/' + pandora.user.ui.item + '/' + pandora.user.ui.videoResolution + 'p' + position + '.jpg';
},
getLargeTimelineImageURL: function(i) {
return '/' + pandora.user.ui.item + '/timeline64p' + i + '.png';
getLargeTimelineURL: function(type, i) {
type = '';
return '/' + pandora.user.ui.item + '/timeline' + type + '64p' + i + '.png';
},
getSmallTimelineImageURL: function(i) {
return '/' + pandora.user.ui.item + '/timeline16p' + i + '.png';
getSmallTimelineURL: function(type, i) {
type = '';
return '/' + pandora.user.ui.item + '/timeline' + type + '16p' + i + '.png';
},
height: pandora.$ui.contentPanel.size(1),
id: 'editor',
@ -54,6 +56,8 @@ pandora.ui.editor = function(data) {
showLayers: Ox.clone(pandora.user.ui.showLayers),
showUsers: pandora.site.annotations.showUsers,
subtitles: data.subtitles,
timeline: pandora.user.ui.videoTimeline,
timelines: pandora.site.timelines,
tooltips: true,
video: data.video,
videoRatio: data.videoRatio,
@ -216,6 +220,9 @@ pandora.ui.editor = function(data) {
subtitles: function(data) {
pandora.UI.set('videoSubtitles', data.subtitles);
},
timeline: function(data) {
pandora.UI.set('videoTimeline', data.timeline);
},
togglecalendar: function(data) {
pandora.UI.set('showAnnotationsCalendar', !data.collapsed);
},

View file

@ -305,8 +305,9 @@ pandora.ui.list = function() {
options: {
duration: data.duration,
find: isClipsQuery ? clipsQuery.conditions[0].value : '',
getImageURL: function(i) {
return '/' + data.id + '/timeline16p' + i + '.png';
getImageURL: function(type, i) {
type = '';
return '/' + data.id + '/timeline' + type + '16p' + i + '.png';
},
position: pandora.user.ui.videoPoints[data.id]
? pandora.user.ui.videoPoints[data.id].position : 0,
@ -314,9 +315,9 @@ pandora.ui.list = function() {
return {'in': clip['in'], out: clip.out};
}) : [],
subtitles: isClipsQuery ? data.clips.map(function(clip) {
Ox.Log('', 'CLIP:::::', clip)
return {'in': clip['in'], out: clip.out, text: clip.annotations[0].value};
}) : []
}) : [],
type: pandora.user.ui.videoTimeline
}
}
};

View file

@ -20,8 +20,9 @@ pandora.ui.player = function(data) {
enableDownload: pandora.site.capabilities.canDownloadVideo[pandora.user.level] >= data.rightslevel,
enableSubtitles: pandora.user.ui.videoSubtitles,
find: pandora.user.ui.itemFind,
getTimelineImageURL: function(i) {
return '/' + pandora.user.ui.item + '/timeline64p' + i + '.png';
getLargeTimelineURL: function(type, i) {
type = '';
return '/' + pandora.user.ui.item + '/timeline' + type + '64p' + i + '.png';
},
height: pandora.$ui.contentPanel.size(1),
'in': pandora.user.ui.videoPoints[pandora.user.ui.item]['in'],
@ -40,9 +41,10 @@ pandora.ui.player = function(data) {
showLayers: Ox.clone(pandora.user.ui.showLayers),
showUsers: pandora.site.annotations.showUsers,
showTimeline: pandora.user.ui.showTimeline,
smallTimelineURL: '/' + pandora.user.ui.item + '/timeline16p.png',
subtitles: data.subtitles,
timeline: pandora.user.ui.videoTimeline,
tooltips: true,
timeline: '/' + pandora.user.ui.item + '/timeline16p.png',
video: data.video,
volume: pandora.user.ui.videoVolume,
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1

View file

@ -21,8 +21,9 @@ pandora.ui.timeline = function(data) {
getFrameURL: function(position) {
return '/' + ui.item + '/' + ui.videoResolution + 'p' + position + '.jpg';
},
getTimelineImageURL: function(i) {
return '/' + ui.item + '/timeline64p' + i + '.png';
getLargeTimelineURL: function(type, i) {
type = '';
return '/' + ui.item + '/timeline' + type + '64p' + i + '.png';
},
height: pandora.$ui.contentPanel.size(1),
layers: data.annotations,
@ -37,8 +38,8 @@ pandora.ui.timeline = function(data) {
showAnnotationsMap: ui.showAnnotationsMap,
showLayers: Ox.clone(ui.showLayers),
showUsers: pandora.site.annotations.showUsers,
smallTimelineURL: '/' + ui.item + '/timeline16p.png',
timeline: ui.videoTimeline,
timelineImageURL: '/' + ui.item + '/timeline16p.png',
timelines: pandora.site.timelines,
video: data.video,
videoRatio: data.videoRatio,
@ -82,6 +83,9 @@ pandora.ui.timeline = function(data) {
select: function(data) {
pandora.UI.set('videoPoints.' + pandora.user.ui.item + '.annotation', data.id.split('/')[1]);
},
timeline: function(data) {
pandora.UI.set('videoTimeline', data.timeline);
},
toggleannotations: function(data) {
pandora.UI.set('showAnnotations', data.showAnnotations);
},