forked from 0x2620/pandora
show video preview only if item is rendered
This commit is contained in:
parent
ed6bcebae6
commit
49674a51b7
1 changed files with 5 additions and 2 deletions
|
@ -66,8 +66,11 @@ pandora.ui.info = function() {
|
||||||
previousView == 'video' && resizeInfo();
|
previousView == 'video' && resizeInfo();
|
||||||
});
|
});
|
||||||
} else if (view == 'video') {
|
} else if (view == 'video') {
|
||||||
pandora.api.get({id: id, keys: ['duration', 'videoRatio']}, function(result) {
|
pandora.api.get({
|
||||||
if (result.data) {
|
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.removeElement();
|
||||||
pandora.$ui.videoPreview = pandora.ui.videoPreview({
|
pandora.$ui.videoPreview = pandora.ui.videoPreview({
|
||||||
duration: result.data.duration,
|
duration: result.data.duration,
|
||||||
|
|
Loading…
Reference in a new issue