PHRAS-2862 #comment Fix lightbox mobile : video resize #time 3h

This commit is contained in:
Harrys Ravalomanana
2020-01-14 16:56:40 +04:00
parent 998c751843
commit 937b9b4c59
2 changed files with 12 additions and 1 deletions

View File

@@ -101,5 +101,13 @@
$('.pdf-iframe').css('height', pdfHeight);
}
});
/*resize of VIDEO */
$(window).on("load resize ",function(e){
if($('.video-iframe').length > 0) {
var ratio = $('[name=videoRatio]').val();
var videoHeight = $('.video-iframe').width() / ratio;
$('.video-iframe').css('height', videoHeight).css('min-height',0);
}
});
</script>
{% endblock %}