video-embed-iframe.html.twig 626 B

12345678910111213141516
  1. {#
  2. /**
  3. * @file
  4. * Display an iframe with alterable components.
  5. */
  6. #}
  7. {# <iframe{{ attributes }}{% if url is not empty %} title="le direct" class="youtube_player" src="{{ url }}{% if query is not empty %}?{{ query | url_encode }}{% endif %}{% if fragment is not empty %}#{{ fragment }}{% endif %}"{% endif %}></iframe> #}
  8. {% if url is not empty %}
  9. {% set id = url|split('v=')|last %}
  10. {% set id = id|split('&')|first %}
  11. {% set id = id|split('/')|last %}
  12. <div class="youtube_player w-100" width="auto" height="auto" videoID="{{ id }}" theme="light" rel="1" controls="1" showinfo="1" autoplay="0" mute="0"></div>
  13. {% endif %}