send layers to annotation pannel. call editAnnotations on change
This commit is contained in:
parent
132cbe30ac
commit
794ec822d5
1 changed files with 36 additions and 23 deletions
|
@ -5,6 +5,7 @@
|
||||||
// fixme: never set ui.videoPosition to 0 ... set to null a.k.a. delete
|
// fixme: never set ui.videoPosition to 0 ... set to null a.k.a. delete
|
||||||
// fixme: sort=-director doesn't work
|
// fixme: sort=-director doesn't work
|
||||||
// fixme: don't reload full right panel on sortSelect
|
// fixme: don't reload full right panel on sortSelect
|
||||||
|
// fixme: clear items cache after login/logout
|
||||||
|
|
||||||
(function() {
|
(function() {
|
||||||
|
|
||||||
|
@ -1443,6 +1444,7 @@
|
||||||
title: folder.title
|
title: folder.title
|
||||||
})
|
})
|
||||||
.bindEvent({
|
.bindEvent({
|
||||||
|
// fixme: duplicated
|
||||||
click: function(event, data) {
|
click: function(event, data) {
|
||||||
var $list = app.$ui.folderList[i],
|
var $list = app.$ui.folderList[i],
|
||||||
hasFocus, id;
|
hasFocus, id;
|
||||||
|
@ -1760,25 +1762,33 @@
|
||||||
} : data);
|
} : data);
|
||||||
},
|
},
|
||||||
enterfullscreen: enterFullscreen,
|
enterfullscreen: enterFullscreen,
|
||||||
exitfullscreen: exitFullscreen
|
exitfullscreen: exitFullscreen,
|
||||||
}))/*.bindEvent({
|
|
||||||
resize: function(event, data) {
|
resize: function(event, data) {
|
||||||
app.$ui.player.options({
|
app.$ui.player.options({
|
||||||
height: data
|
height: data
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
})*/;
|
}));
|
||||||
} else if (app.user.ui.itemView == 'timeline') {
|
} else if (app.user.ui.itemView == 'timeline') {
|
||||||
var video = result.data.item.stream,
|
var layers = [],
|
||||||
|
video = result.data.item.stream,
|
||||||
cuts = result.data.item.cuts || {},
|
cuts = result.data.item.cuts || {},
|
||||||
subtitles = result.data.item.layers.subtitles || [{
|
subtitles = result.data.item.layers.subtitles;
|
||||||
'in': 5,
|
video.height = video.profiles[0];
|
||||||
'out': 10,
|
|
||||||
'value': 'This subtitle is just a test...'
|
|
||||||
}];
|
|
||||||
video.height = video.profiles[0]
|
|
||||||
video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
|
video.width = parseInt(video.height * video.aspectRatio / 2) * 2;
|
||||||
video.url = video.baseUrl + '/' + video.height + 'p.' + ($.support.video.webm ? 'webm' : 'mp4');
|
video.url = video.baseUrl + '/' + video.height + 'p.' + ($.support.video.webm ? 'webm' : 'mp4');
|
||||||
|
$.each(app.config.layers, function(i, layer) {
|
||||||
|
layers[i] = $.extend({}, layer);
|
||||||
|
if (result.data.item.layers[layer.id])
|
||||||
|
layers[i]['items'] = result.data.item.layers[layer.id];
|
||||||
|
else
|
||||||
|
layers[i]['items'] = [{
|
||||||
|
'in': 5,
|
||||||
|
'out': 10,
|
||||||
|
'value': 'This annotation is just a test...'
|
||||||
|
}];
|
||||||
|
|
||||||
|
});
|
||||||
app.$ui.contentPanel.replace(1, app.$ui.editor = new Ox.VideoEditor({
|
app.$ui.contentPanel.replace(1, app.$ui.editor = new Ox.VideoEditor({
|
||||||
annotationsSize: app.user.ui.annotationsSize,
|
annotationsSize: app.user.ui.annotationsSize,
|
||||||
cuts: cuts,
|
cuts: cuts,
|
||||||
|
@ -1790,7 +1800,7 @@
|
||||||
height: app.$ui.contentPanel.size(1),
|
height: app.$ui.contentPanel.size(1),
|
||||||
id: 'editor',
|
id: 'editor',
|
||||||
largeTimeline: true,
|
largeTimeline: true,
|
||||||
layers: app.config.layers,
|
layers: layers,
|
||||||
matches: [],
|
matches: [],
|
||||||
points: [0, 0],
|
points: [0, 0],
|
||||||
position: app.user.ui.videoPosition[app.user.ui.item] || 0,
|
position: app.user.ui.videoPosition[app.user.ui.item] || 0,
|
||||||
|
@ -1804,15 +1814,18 @@
|
||||||
videoURL: video.url,
|
videoURL: video.url,
|
||||||
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1
|
width: app.$ui.document.width() - app.$ui.mainPanel.size(0) - 1
|
||||||
}).bindEvent({
|
}).bindEvent({
|
||||||
/*
|
|
||||||
resize: function(event, data) {
|
resize: function(event, data) {
|
||||||
app.$ui.editor.options({
|
app.$ui.editor.options({
|
||||||
width: data
|
height: data
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
*/
|
|
||||||
togglesize: function(event, data) {
|
togglesize: function(event, data) {
|
||||||
UI.set({videoSize: data.size});
|
UI.set({videoSize: data.size});
|
||||||
|
},
|
||||||
|
updateAnnotation: function(event, data) {
|
||||||
|
//fixme: check that edit was successfull
|
||||||
|
Ox.print('updateAnnotation', data);
|
||||||
|
pandora.api.editAnnotation(data);
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
that.bindEvent('resize', function(event, data) {
|
that.bindEvent('resize', function(event, data) {
|
||||||
|
@ -3365,7 +3378,7 @@
|
||||||
|
|
||||||
function resizeWindow() {
|
function resizeWindow() {
|
||||||
resizeFolders();
|
resizeFolders();
|
||||||
if (app.user.ui.item == '') {
|
if (!app.user.ui.item) {
|
||||||
app.$ui.list.size();
|
app.$ui.list.size();
|
||||||
resizeGroups(app.$ui.rightPanel.width());
|
resizeGroups(app.$ui.rightPanel.width());
|
||||||
if (app.user.ui.listView == 'map') {
|
if (app.user.ui.listView == 'map') {
|
||||||
|
|
Loading…
Reference in a new issue