yamlform-element-video-file.html.twig in YAML Form 8
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.
File
templates/yamlform-element-video-file.html.twigView source
- {#
- /**
- * @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('yamlform/yamlform.element.video_file') }}
- <div class="yamlform-video-file">
- <video width="620" height="349" controls>
- <source src="{{ uri }}" type="{{ type }}">
- </video>
- </div>
- {% endif %}
- <div>{{ file_link }}</div>