This repository has been archived on 2025-01-19. You can view files and clone it, but cannot push or open issues or pull requests.
drupalcampbristol/web/modules/contrib/webform/templates/webform-element-video-file.html.twig
2017-03-16 15:29:07 +00:00

26 lines
671 B
Twig

{#
/**
* @file
* 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.
*
* @see http://caniuse.com/#feat=video
* @see http://www.w3schools.com/html/html5_audio.asp
*/
#}
{% if extension == 'mp4' %}
{{ attach_library('webform/webform.element.video_file') }}
<div class="webform-video-file">
<video width="620" height="349" controls>
<source src="{{ uri }}" type="{{ type }}">
</video>
</div>
{% endif %}
<div>{{ file_link }}</div>