Add audio preview.

This commit is contained in:
Lars Jung 2014-06-09 00:54:41 +02:00
parent b7081b32de
commit af29d651b5
7 changed files with 150 additions and 6 deletions

View file

@ -16,7 +16,6 @@ modulejs.define('ext/preview-vid', ['_', '$', 'core/settings', 'core/event', 'ex
})
.attr('autoplay', 'autoplay')
.attr('controls', 'controls')
.attr('preload', 'auto')
.attr('src', src);
},
@ -35,9 +34,7 @@ modulejs.define('ext/preview-vid', ['_', '$', 'core/settings', 'core/event', 'ex
$vid.css({
'left': '' + (($content.width()-$vid.width())*0.5) + 'px',
'top': '' + (($content.height()-$vid.height())*0.5) + 'px',
'max-width': $content.width(),
'height': $content.height()
'top': '' + (($content.height()-$vid.height())*0.5) + 'px'
});
preview.setLabels([
@ -64,6 +61,7 @@ modulejs.define('ext/preview-vid', ['_', '$', 'core/settings', 'core/event', 'ex
preview.showSpinner(false);
$('#pv-content').fadeOut(100, function () {
$('#pv-content').empty().append($preloaded_vid.attr('id', 'pv-vid-video')).fadeIn(200);
// small timeout, so $preloaded_vid is visible and therefore $preloaded_vid.width is available