feat: Ne charger les vidéo seulement lorsqu'on appuie volontairement sur play

This commit is contained in:
Simon 2024-03-17 00:54:25 +01:00
parent cc8d27b036
commit 62faf520a9
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@
{{- else if $unsupportedfile -}}
{{- errorf "No valid video file with filename %q found." $video_src -}}
{{- else -}}
<video {{ if ne (.Get "controls") "false" }}controls {{ end }}preload="auto" width="{{ or (.Get "width") $width }}" {{ with .Get "height" }}height="{{.}}"{{ end }} {{ if eq (.Get "autoplay") "true" }}autoplay {{ end }}{{ if eq (.Get "loop") "true" }}loop {{ end }}{{ if eq (.Get "muted") "true" }}muted {{ end }}{{ with $poster }}poster="{{ .RelPermalink }}" {{ end }}playsinline class="html-video">
<video {{ if ne (.Get "controls") "false" }}controls {{ end }}preload="none" width="{{ or (.Get "width") $width }}" {{ with .Get "height" }}height="{{.}}"{{ end }} {{ if eq (.Get "autoplay") "true" }}autoplay {{ end }}{{ if eq (.Get "loop") "true" }}loop {{ end }}{{ if eq (.Get "muted") "true" }}muted {{ end }}{{ with $poster }}poster="{{ .RelPermalink }}" {{ end }}playsinline class="html-video">
{{- with $video_webm }}
<source src="{{ .RelPermalink }}" type="video/webm">
{{- $video_dl = . -}}