{% if title or text or url %}
<section class="m_video" m-pack="basic">

  {% include 'm_components/widgets/headline.twig' with {title: title, text: text} only %}

  <div class="m_video__block">

      <div class="m_video__overlay">
        {% if image.id %}
          <div class="m_video__overlayImage ">
            <span class="m_video__player"></span>

              {% include 'm_components/widgets/picture.twig' with {image: image, title: subtitle} only %}

          </div>
        {% endif %}

        {% if "vimeo" in url %}
          <iframe title="{{subtitle}}" {% if image.id %}data-{% endif %}src="{{ url|replace({'vimeo.com': 'player.vimeo.com/video'}) }}" frameborder="0" allow="encrypted-media" allowfullscreen width="100%" height="100%"></iframe>
        {% elseif "youtu" in url %}
          <iframe class="youtube" title="{{subtitle}}" {% if image.id %}data-{% endif %}src="{{ url|replace({'watch?v=':'embed/'}) }}?rel=0&amp;controls=0&amp;showinfo=0" frameborder="0" allow="encrypted-media" allowfullscreen width="100%" height="100%"></iframe>
        {% else %}
          <iframe title="{{subtitle}}" {% if image.id %}data-{% endif %}src="{{ url|replace({'video' : 'embed/video'}) }}" frameborder="0" allow="encrypted-media" allowfullscreen width="100%" height="100%"></iframe>
        {% endif %}
        {% if url %}{% endif %}
      </div>

      {% if subtitle or subtext %}
      <div class="m_video__content">
        {% if subtitle %}<h2 class="h3">{{subtitle|raw}}</h2>{% endif %}
        <div class="m_content"> {{ fn.apply_filters('the_content', fn.html_entity_decode(subtext) )|raw }}</div>
      </div>
      {% endif %}

  </div>

</section>


{% endif %}
