You are here

yamlform-element-video-file.html.twig in YAML Form 8

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/yamlform-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 http://www.w3schools.com/html/html5_audio.asp
  15. */
  16. #}
  17. {% if extension == 'mp4' %}
  18. {{ attach_library('yamlform/yamlform.element.video_file') }}
  19. <div class="yamlform-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>