Fix video-js resize

This commit is contained in:
Romain Neutron
2012-07-16 17:29:54 +02:00
parent 8c51c16bb2
commit a911e0745a
2 changed files with 12 additions and 3 deletions

View File

@@ -12,6 +12,10 @@
preload="auto" xposter="my_video_poster.png" width="{{ displayWidth|round }}" height="{{ displayHeight | round }}"
data-setup="{}">
{% for name, subdef in arraySubdefs %}
{% if loop.first %}
<input type="hidden" name="width" value="{{subdef.get_width()}}"/>
<input type="hidden" name="height" value="{{subdef.get_height()}}"/>
{% endif %}
{% if session.is_authenticated() == true %}
{% set url = subdef.get_url() %}
{% else %}
@@ -26,7 +30,11 @@
$(document).ready(function(){
try {
_V_("video_preview_tooltip", {}, function(){
var player = this;
$('#video_preview_tooltip').parent().bind('resize-video-js', function(){
player.width($(this).width());
player.height($(this).height());
});
});
} catch(err) {
console.error('An error has been catched during the execution of VideoJS', err);

View File

@@ -498,6 +498,7 @@ function setPreview(){
top: t,
left: l
}).attr('width',w).attr('height',h);
$('#PREVIEWIMGCONT .record').trigger('resize-video-js');
}
function classicMode(){