after changing poster frame, update video preview

This commit is contained in:
rolux 2013-02-11 11:14:13 +05:30
parent 8368e9cbdf
commit 5b0b368c7e
2 changed files with 11 additions and 1 deletions

View file

@ -191,6 +191,12 @@ pandora.ui.editor = function(data) {
pandora.api.setPosterFrame({ pandora.api.setPosterFrame({
id: ui.item, id: ui.item,
position: data.position position: data.position
}, function() {
if (pandora.$ui.videoPreview) {
pandora.$ui.videoPreview.options({
position: data.position
});
}
}); });
}, },
removeannotation: function(data) { removeannotation: function(data) {

View file

@ -857,7 +857,6 @@ pandora.ui.infoView = function(data) {
// fixme: api slightly inconsistent, this shouldn't be "position" // fixme: api slightly inconsistent, this shouldn't be "position"
position: selectedImage.index position: selectedImage.index
}), function() { }), function() {
// fixme: update the info (video preview) frame as well
var src; var src;
pandora.clearIconCache(data.id); pandora.clearIconCache(data.id);
Ox.Request.clearCache(); Ox.Request.clearCache();
@ -865,6 +864,11 @@ pandora.ui.infoView = function(data) {
src = '/' + data.id + '/icon512.jpg?' + Ox.uid() src = '/' + data.id + '/icon512.jpg?' + Ox.uid()
$icon.attr({src: src}); $icon.attr({src: src});
$reflectionIcon.attr({src: src}); $reflectionIcon.attr({src: src});
if (pandora.$ui.videoPreview) {
pandora.$ui.videoPreview.options({
position: $list.value(selectedImage.index, 'position')
});
}
} }
$browserImages.each(function() { $browserImages.each(function() {
$(this).attr({src: '/' + data.id + '/' + ( $(this).attr({src: '/' + data.id + '/' + (