You are here

media-video-file-formatter.html.twig in Media entity video 8

Default theme implementation for a HTML5 video player.

Available variables:

  • attributes: The HTML attributes for the containing element.
  • extravalue: The extra video attributes.
  • media_link: A link to the file.
  • mimetype: The MIME type of the file.
  • value: Whether to provide a Download Link or not.

See also

template_preprocess_media_video_file_formatter()

File

templates/media-video-file-formatter.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for a HTML5 video player.
  5. *
  6. * Available variables:
  7. * - attributes: The HTML attributes for the containing element.
  8. * - extravalue: The extra video attributes.
  9. * - media_link: A link to the file.
  10. * - mimetype: The MIME type of the file.
  11. * - value: Whether to provide a Download Link or not.
  12. *
  13. * @see template_preprocess_media_video_file_formatter()
  14. *
  15. * @ingroup themeable
  16. */
  17. #}
  18. <video {{ extravalue }}>
  19. <source src="{{ media_link }}" type="{{ mimetype }}">
  20. </video>
  21. {% if value %}
  22. <a href="{{ media_link }}" target="_blank" download>{{ 'Download'|t }}</a>
  23. {% endif %}