forked from 0x2620/pandora
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:
parent
453f83e067
commit
d9d79b1813
2 changed files with 11 additions and 5 deletions
|
@ -81,6 +81,9 @@ pandora.ui.info = function() {
|
|||
frameRatio: result.data.videoRatio,
|
||||
height: pandora.getInfoHeight(true),
|
||||
id: id,
|
||||
position: !ui.item && ui.listView == 'timelines'
|
||||
? (ui.videoPoints[id] ? ui.videoPoints[id].position : 0)
|
||||
: void 0,
|
||||
width: ui.sidebarSize
|
||||
})
|
||||
.bindEvent({
|
||||
|
@ -286,6 +289,7 @@ pandora.ui.listInfo = function() {
|
|||
borderRadius: Math.round(size / 4) + 'px'
|
||||
};
|
||||
}
|
||||
|
||||
that.resizeInfo = function() {
|
||||
var width = that.width();
|
||||
$icon.css(getIconCSS());
|
||||
|
@ -297,7 +301,9 @@ pandora.ui.listInfo = function() {
|
|||
width: width
|
||||
});
|
||||
};
|
||||
|
||||
return that;
|
||||
|
||||
};
|
||||
|
||||
pandora.ui.posterInfo = function(data) {
|
||||
|
|
|
@ -292,16 +292,16 @@ pandora.ui.list = function() {
|
|||
element: Ox.BlockVideoTimeline,
|
||||
events: {
|
||||
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]) {
|
||||
pandora.UI.set('videoPoints.' + data.id + '.position', event.position);
|
||||
} else {
|
||||
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,
|
||||
|
|
Loading…
Reference in a new issue