videojs.html.twig in Video.js (HTML5 Video Player) 8
Default theme implementation to display a formatted video field.
Available variables:
- items: A collection of videos.
- player_attributes: Player options including the following:
- width: The width of the video (if known).
- height: The height of the video (if known).
- autoplay: Autoplay on or off
2 theme calls to videojs.html.twig
- VideoJsPlayerFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ VideoJsPlayerFormatter.php - Builds a renderable array for a field value.
- VideoJsPlayerListFormatter::viewElements in src/
Plugin/ Field/ FieldFormatter/ VideoJsPlayerListFormatter.php - Builds a renderable array for a field value.
File
templates/videojs.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation to display a formatted video field.
- *
- * Available variables:
- * - items: A collection of videos.
- * - player_attributes: Player options including the following:
- * - width: The width of the video (if known).
- * - height: The height of the video (if known).
- * - autoplay: Autoplay on or off
- *
- * @ingroup themeable
- */
- #}
- <video data-setup="{}" class="video-js vjs-default-skin" preload="{{ player_attributes.preload }}" {{ player_attributes.controls ? 'controls' : '' }} style="width:{{ player_attributes.width }}px;height:{{ player_attributes.height }}px;" {{ player_attributes.autoplay ? 'autoplay' : '' }} {{ player_attributes.loop ? 'loop' : '' }} {{ player_attributes.muted ? 'muted' : '' }}>
- {% for user in items %}
- <source src="{{ user }}"/>
- {% endfor %}
- </video>