{% set video = block.video %}
<section class="container container-sm content-block js-fade-in {{ styleModifier | default(null) }}">
{{ include('Includes/title-block.html.twig', {
title: block.headline,
subtitle: block.subtitle,
isCentered: true
}) }}
{% if video.type == 'asset' %}
{% set options = {
'imagethumbnail': 'video-overlay',
'width': '100%',
'height': '100%',
'attributes': {
'muted' :'true',
'controls': 'controls',
'preload': 'none',
'class': 'video-js js-video-js js-lazy-iframe js-play-video__video embed-responsive-item'
}
} %}
{% set video = elements_videoHelper().getVideoTag(video, options) %}
<div class="video-overlay__wrapper js-play-video">
<div class="video-overlay embed-responsive embed-responsive-16by9 js-play-video__overlay">
<span class="icon icon-play video-overlay__icon" title="play" aria-label="play"></span>
{% if video.posterAsset is instanceof('\\Pimcore\\Model\\Asset\\Image') %}
{{ video.posterAsset.thumbnail('video-overlay').html({
imgAttributes: {
class: 'js-lazy-img embed-responsive-item'
},
lowQualityPlaceholder: true
})|raw }}
{% else %}
<img src="{{ video.imageThumbnail('video-overlay') }}" class="js-lazy-img embed-responsive-item">
{% endif %}
</div>
<div class="video-overlay__video embed-responsive embed-responsive-16by9">
{{ video|raw }}
{% do jsConfig().add('videoJs', true) %}
</div>
</div>
{% else %}
{% set options = {
'imagethumbnail': 'video-overlay',
'width': '100%',
'height': '100%',
'youtube': {
'rel': 0,
'showinfo': 0,
'frameborder' : 0,
'allow' : "autoplay; encrypted-media",
'allowfullscreen' : true
},
'class': 'video-js js-video-js embed-responsive-item'
} %}
{% set video = elements_videoHelper().getVideoTag(video, options) %}
<div class="video-area__video embed-responsive embed-responsive-16by9">
<div class="cookieconsent-optout-marketing embed-responsive-item bg-light-bg d-flex justify-content-center flex-column align-items-center">
{{ 'cookies.accept-cookies-to-show-video' |trans }}
<a class="btn btn-primary-light mt-4" href="javascript:Cookiebot.renew()">
{{ 'cookies.accept-marketing-cookies' |trans }}
</a>
</div>
{{ video|raw }}
</div>
{% endif %}
</section>