2024-04-02 19:36:21 +00:00
|
|
|
<!--
|
|
|
|
Render a video in an interactive player.
|
|
|
|
|
|
|
|
@params context Video media file.
|
|
|
|
@params page_file_path Filepath of the calling file for error messages.
|
|
|
|
-->
|
|
|
|
|
2024-07-23 08:08:36 +00:00
|
|
|
{{- $src := .src -}}
|
2024-04-02 19:36:21 +00:00
|
|
|
|
|
|
|
<video
|
|
|
|
class="u-video figure__video"
|
|
|
|
controls
|
|
|
|
itemprop="video"
|
2024-08-09 21:03:12 +00:00
|
|
|
preload="none"
|
2024-04-02 19:36:21 +00:00
|
|
|
src="{{ $src.RelPermalink }}"
|
|
|
|
poster="
|
|
|
|
{{- if $src.Params.poster -}}
|
|
|
|
{{- $posterSrc := $.Page.Resources.GetMatch ( .Get $src.Params.poster ) -}}
|
|
|
|
{{- with $posterSrc.Resize "1200x webp" -}}
|
|
|
|
{{- .RelPermalink -}}
|
|
|
|
{{- end -}}
|
|
|
|
{{- else -}}
|
|
|
|
{{- erroridf "a11y-video-poster" "No poster defined for resource %q (%q)" $src.RelPermalink .page_file_path -}}
|
|
|
|
{{- end -}}
|
|
|
|
"
|
|
|
|
>
|
|
|
|
Your browser doesn't support embedded video, <a href="{{ $src.RelPermalink }}">view the video here</a>.
|
2024-07-23 08:08:36 +00:00
|
|
|
</video>
|