feat: Ne charger les vidéo seulement lorsqu'on appuie volontairement sur play
This commit is contained in:
parent
cc8d27b036
commit
62faf520a9
|
@ -49,7 +49,7 @@
|
||||||
{{- else if $unsupportedfile -}}
|
{{- else if $unsupportedfile -}}
|
||||||
{{- errorf "No valid video file with filename %q found." $video_src -}}
|
{{- errorf "No valid video file with filename %q found." $video_src -}}
|
||||||
{{- else -}}
|
{{- 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 }}
|
{{- with $video_webm }}
|
||||||
<source src="{{ .RelPermalink }}" type="video/webm">
|
<source src="{{ .RelPermalink }}" type="video/webm">
|
||||||
{{- $video_dl = . -}}
|
{{- $video_dl = . -}}
|
||||||
|
|
Loading…
Reference in New Issue