show video preview only if item is rendered

This commit is contained in:
j 2011-10-24 00:03:41 +02:00
parent ed6bcebae6
commit 49674a51b7

View file

@ -66,8 +66,11 @@ pandora.ui.info = function() {
previousView == 'video' && resizeInfo();
});
} else if (view == 'video') {
pandora.api.get({id: id, keys: ['duration', 'videoRatio']}, function(result) {
if (result.data) {
pandora.api.get({
id: id,
keys: ['duration', 'rendered', 'videoRatio']
}, function(result) {
if (result.data && result.data.rendered) {
pandora.$ui.videoPreview && pandora.$ui.videoPreview.removeElement();
pandora.$ui.videoPreview = pandora.ui.videoPreview({
duration: result.data.duration,