bynder-video.html.twig in Bynder 4.0.x
Default theme implementation to display the file entity as a video tag.
Available variables:
- attributes: An array of HTML attributes, intended to be added to the video tag.
- files: And array of files to be added as sources for the video tag. Each
element is an array with the following elements:
- file: The full file object.
- source_attributes: An array of HTML attributes for to be added to the source tag.
1 theme call to bynder-video.html.twig
- BynderVideoFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ BynderVideoFormatter.php - Builds a renderable array for a field value.
File
templates/bynder-video.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display the file entity as a video tag.
- *
- * Available variables:
- * - attributes: An array of HTML attributes, intended to be added to the
- * video tag.
- * - files: And array of files to be added as sources for the video tag. Each
- * element is an array with the following elements:
- * - file: The full file object.
- * - source_attributes: An array of HTML attributes for to be added to the
- * source tag.
- *
- * @ingroup themeable
- */
- #}
- <video {{ attributes }}>
- {% for source_attribute in source_attributes %}
- <source {{ source_attribute }} />
- {% endfor %}
- </video>