media-video-file-formatter.html.twig in Media entity video 8
Same filename and directory in other branches
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()
1 theme call to media-video-file-formatter.html.twig
- VideoPlayerHTML5::viewElements in src/
Plugin/ Field/ FieldFormatter/ VideoPlayerHTML5.php - Builds a renderable array for a field value.
File
templates/media-video-file-formatter.html.twigView source
- {#
- /**
- * @file
- * 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 template_preprocess_media_video_file_formatter()
- *
- * @ingroup themeable
- */
- #}
- <video {{ extravalue }}>
- <source src="{{ media_link }}" type="{{ mimetype }}">
- </video>
- {% if value %}
- <a href="{{ media_link }}" target="_blank" download>{{ 'Download'|t }}</a>
- {% endif %}