degov-8.x-2.0/modules/degov_media_video_upload/templates/media--video_upload--reference.html.twig
modules/degov_media_video_upload/templates/media--video_upload--reference.html.twig
{#
/**
* @file
* Default theme implementation to present a media entity.
*
* Available variables:
* - name: Name of the media.
* - content: Media content.
*
* @see template_preprocess_media()
*
* @ingroup themeable
*/
#}
{% set caption %}
{{- content.field_video_upload_caption -}}
{% endset %}
{% set copyright %}
{{- content.field_copyright -}}
{% endset %}
{%
set media_classes = [
'video-upload',
'clearfix',
]
%}
<article{{ attributes.addClass(media_classes) }}>
{{ content.contextual_links }}
<div class="video-upload__video">
<video{{ video_attributes }}>
{% if video_mp4 %}
<source src="{{ video_mp4 }}" type="video/mp4">
{% endif %}
{% if video_ogg %}
<source src="{{ video_ogg }}" type="video/ogg">
{% endif %}
{% if video_webm %}
<source src="{{ video_webm }}" type="video/webm">
{% endif %}
{% trans %}
I'm sorry; your browser doesn't support HTML5 video in WebM with VP8/VP9 or MP4 with H.264.
{% endtrans %}
{% for key, subtitle in content.field_video_upload_subtitle if key|first != '#' %}
{{ subtitle }}
{% endfor %}
</video>
{% if content.field_title|field_value or content.field_copyright|field_value %}
<div class="video-upload__info">
<div class="video__info__wrap">
{% if content.field_title|field_value %}
<span class="video-upload__caption"{{ content.field_title|quickedit_attr }}>{{ content.field_title|field_value }}</span>
{% endif %}
{% if content.field_copyright|field_value %}
<span class="video-upload__copyright">
<span class="video-upload__copyright-label"{{ content.field_copyright|quickedit_attr }}>{{ '©'|trans }}</span>
{{ content.field_copyright|field_value }}
</span>
{% endif %}
</div>
</div>
{% endif %}
</div>
</article>
