Colorbox - Internes Video
Hallo,
versuche gerade ein Video was per Contao eingebunden wurde in der Colorbox zu öffnen. Dies hab ich jetzt auch soweit.
PHP-Code:
<div style="display:none">
<div id="video_<?= $this->id;?>" class="ce_player">
<video poster="<?= $this->image;?>" preload="none" controls style="width:100%">
<source type="<?= $this->mime; ?>" src="<?= $this->playerSRC; ?>" title="<?= $this->title;?>">
</video>
</div>
</div>
<a title="<?= $this->title;?>" href="#video_<?= $this->id;?>" data-id="<?= $this->id;?>" data-title="<?= $this->title;?>" data-content="video_<?= $this->id;?>" class="video_local">
<script type="text/javascript">
jQuery(document).ready(function(){
$(".video_local").colorbox({
inline: true,
width:"50%"
});
});
</script>
Allerdings sind 50% auf dem mobilen Endgeräten recht wenig und hätte es da gern so das es eben 95% der Breite und die Höhe automatisch anpasst. Die Optionen maxWidth: '95%' & maxHeight: '95%' bringen leider nicht.
Hat jemand eventuell ein Lösungsansatz oder kann die Colorbox was ohne das man große alles alle Breiten & Höhren der Colorbox + Video berechnen muss?