parent
a8d2c3ac66
commit
f4d75b5b78
|
@ -26,7 +26,7 @@ class VimeoMediaIngester implements IngesterInterface
|
|||
}
|
||||
public function getLabel()
|
||||
{
|
||||
return 'Vimeo model'; // @translate
|
||||
return 'Vimeo video'; // @translate
|
||||
}
|
||||
public function getRenderer()
|
||||
{
|
||||
|
|
|
@ -3,7 +3,7 @@ $this->headScript()->appendFile($this->assetUrl('js/height_calculator.js',
|
|||
'Vimeo'));
|
||||
?>
|
||||
|
||||
<div id="vimeo_<?= $video_id ?>" class="vimeo-wrap" style="position:relative;">
|
||||
<div id="vimeo_<?= $video_id ?>" class="vimeo-embed-wrapper" style="position:relative;">
|
||||
|
||||
<?php if ($renderSourceLink) { ?>
|
||||
<div class="source-link">
|
||||
|
@ -22,10 +22,18 @@ $this->headScript()->appendFile($this->assetUrl('js/height_calculator.js',
|
|||
</div>
|
||||
|
||||
<script>
|
||||
function adjust_height() {
|
||||
$(".vimeo-embed-wrapper").each(function() {
|
||||
var iframe = $(this).find('iframe')
|
||||
$(iframe).prop("width", "<?= $width ?>%")
|
||||
var height = get_height(iframe, <?= $ratio ?>)
|
||||
$(iframe).prop("height", height)
|
||||
});
|
||||
}
|
||||
jQuery(document).ready(function() {
|
||||
var vimeo = $("#vimeo_<?= $video_id ?>").find('iframe');
|
||||
$(vimeo).prop("width", "<?= $width ?>%")
|
||||
var height = get_height(vimeo, <?= $ratio ?>)
|
||||
$(vimeo).prop("height", height)
|
||||
adjust_height();
|
||||
});
|
||||
$( window ).resize(function() {
|
||||
adjust_height();
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue