mirror of
https://github.com/lrsjng/h5ai.git
synced 2025-05-29 06:25:18 -04:00
Add audio preview.
This commit is contained in:
parent
b7081b32de
commit
af29d651b5
7 changed files with 150 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue