You are here

webform-element-video-file.html.twig in Webform 6.x

Same filename and directory in other branches
  1. 8.5 templates/webform-element-video-file.html.twig

Default theme implementation for a video file element.

Available variables:

  • element: The element.
  • value: The element's value.
  • options Associative array of options for element.
  • file: The element's File object.
  • file_link: Link to the file.

File

templates/webform-element-video-file.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a video file element.
  5. *
  6. * Available variables:
  7. * - element: The element.
  8. * - value: The element's value.
  9. * - options Associative array of options for element.
  10. * - file: The element's File object.
  11. * - file_link: Link to the file.
  12. *
  13. * @see http://caniuse.com/#feat=video
  14. * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/video
  15. */
  16. #}
  17. {% if extension == 'mp4' %}
  18. {{ attach_library('webform/webform.element.video_file') }}
  19. <div class="webform-video-file">
  20. <video width="620" height="349" controls>
  21. <source src="{{ uri }}" type="{{ type }}">
  22. </video>
  23. </div>
  24. {% endif %}
  25. <div>{{ file_link }}</div>