fix #781: in timelines list view, set video points immediately after position event fired by timeline, and change video preview to always display the current position

This commit is contained in:
rolux 2012-06-10 19:19:37 +00:00
parent 453f83e067
commit d9d79b1813
2 changed files with 11 additions and 5 deletions

View file

@ -81,6 +81,9 @@ pandora.ui.info = function() {
frameRatio: result.data.videoRatio, frameRatio: result.data.videoRatio,
height: pandora.getInfoHeight(true), height: pandora.getInfoHeight(true),
id: id, id: id,
position: !ui.item && ui.listView == 'timelines'
? (ui.videoPoints[id] ? ui.videoPoints[id].position : 0)
: void 0,
width: ui.sidebarSize width: ui.sidebarSize
}) })
.bindEvent({ .bindEvent({
@ -286,6 +289,7 @@ pandora.ui.listInfo = function() {
borderRadius: Math.round(size / 4) + 'px' borderRadius: Math.round(size / 4) + 'px'
}; };
} }
that.resizeInfo = function() { that.resizeInfo = function() {
var width = that.width(); var width = that.width();
$icon.css(getIconCSS()); $icon.css(getIconCSS());
@ -297,7 +301,9 @@ pandora.ui.listInfo = function() {
width: width width: width
}); });
}; };
return that; return that;
}; };
pandora.ui.posterInfo = function(data) { pandora.ui.posterInfo = function(data) {

View file

@ -292,16 +292,16 @@ pandora.ui.list = function() {
element: Ox.BlockVideoTimeline, element: Ox.BlockVideoTimeline,
events: { events: {
position: function(event) { position: function(event) {
// FIXME: we need a way to set the position
// once the video preview has loaded
pandora.$ui.videoPreview && pandora.$ui.videoPreview.options({
position: event.position
});
if (pandora.user.ui.videoPoints[data.id]) { if (pandora.user.ui.videoPoints[data.id]) {
pandora.UI.set('videoPoints.' + data.id + '.position', event.position); pandora.UI.set('videoPoints.' + data.id + '.position', event.position);
} else { } else {
pandora.UI.set('videoPoints.' + data.id, {'in': 0, out: 0, position: event.position}); pandora.UI.set('videoPoints.' + data.id, {'in': 0, out: 0, position: event.position});
} }
// FIXME: we need a way to set the position
// once the video preview has loaded
pandora.$ui.videoPreview && pandora.$ui.videoPreview.options({
position: event.position
});
} }
}, },
id: data.id, id: data.id,