feat: add muted attribute and refine autoplay condition for video shortcode (#1256)
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
{{- $src := .Get "src" | default (.Get 0) -}}
|
{{- $src := .Get "src" | default (.Get 0) -}}
|
||||||
<div class="video-wrapper">
|
<div class="video-wrapper">
|
||||||
<video
|
<video
|
||||||
controls
|
controls
|
||||||
src="{{- $src -}}"
|
src="{{- $src -}}"
|
||||||
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
{{ with .Get "poster" }}poster="{{- . -}}"{{ end }}
|
||||||
{{ with .Get "autoplay" }}autoplay{{ end }}
|
{{ if eq (.Get "autoplay") "true" }}autoplay{{ end }}
|
||||||
|
{{ if eq (.Get "muted") "true" }}muted{{ end }}
|
||||||
>
|
>
|
||||||
<p>
|
<p>
|
||||||
Your browser doesn't support HTML5 video. Here is a
|
Your browser doesn't support HTML5 video. Here is a
|
||||||
|
|||||||
Reference in New Issue
Block a user