{% set spacingSelect %}
{{ pimcore_checkbox("checkSpacing", {
"reload": true
}) }}
{% endset %}
{% set noSpacingTop = '' %}
{% set brickAnchorId = '' %}
{% if pimcore_checkbox('checkSpacing').isChecked() %}
{% set noSpacingTop = 'no-offset-top' %}
{% endif %}
{% set UID = uniqid() %}
<div id="{{ brickAnchorId }}" class="section {{ noSpacingTop }} video-wrapper">
<div id="{{ 'uid' ~ UID |raw }}" class="video-container with-overlay">
{% if editmode %}
<div class="flex-col offset-bottom-single">
<div class="col xs-12 m-6 l-3">
<span class="hint">{{ 'Youtube ID eingeben' |trans }}</span>
{{ pimcore_input("youtubeID", {
"width": 300,
"reload": true
}) }}
</div>
<div class="col xs-12 m-6 l-3">
<span class="hint">{{ 'Bitte wählen Sie ein Overlay-Bild aus' |trans }}</span>
<div class="image">
{{ pimcore_image("iframeOverlay", {
"title": "Drag your image here",
"width": 300,
"height": 150,
"thumbnail": "iframeOverlay" ~ bundleName,
"reload": true
}) }}
</div>
</div>
</div>
{% endif %}
{% if pimcore_image("iframeOverlay") is not empty %}
<div class="overlay-close icon close">
</div>
{% set videoIDResult = pimcore_input("youtubeID") %}
<div class="video-wrapper">
<div class="iframe-container {{ videoIDResult }}">
<div id="{{ videoIDResult }}" class="mute-yt-player-container" data-video-id-result="{{ videoIDResult }}"></div>
</div>
</div>
{% if pimcore_image("iframeOverlay").getThumbnail("iframeOverlay") is not empty %}
<div class="image video-overlay">
<div class="play-button-container">
<h2>{{ 'Play Video' |trans }}</h2>
<span class="icon play-button"></span>
</div>
{{ pimcore_image("iframeOverlay").getThumbnail("iframeOverlay" ~ bundleName).getHTML() |raw }}
{#IE Fix for thumbnails rendering start#}
<script type='text/javascript'>
var waitForJQuery = setInterval(function () {
if (typeof $ != 'undefined') {
$(function() {
if (navigator.userAgent.match(/msie/i) || navigator.userAgent.match(/trident/i) ){
$(".video-container .image.video-overlay").css({
width: "100%",
height: "500px",
background: "url( {{ pimcore_image("iframeOverlay").getSrc() }} ) center right 100%/cover no-repeat"
});
$(".video-container .image.video-overlay img").hide();
}
});
clearInterval(waitForJQuery);
}
}, 50);
</script>
{#IE Fix for thumbnails rendering end#}
</div>
{% endif %}
{% endif %}
</div>
</div>