mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 10:42:27 -05:00
[feature] Use gifv type for short soundless mp4 videos (#3182)
This commit is contained in:
parent
3045782b49
commit
b19cfee7ae
5 changed files with 49 additions and 8 deletions
|
|
@ -99,7 +99,7 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{
|
|||
<i class="hide fa fa-fw fa-eye-slash" aria-hidden="true"></i>
|
||||
<i class="show fa fa-fw fa-eye" aria-hidden="true"></i>
|
||||
</span>
|
||||
{{- if eq .Type "video" }}
|
||||
{{- if or (eq .Type "video") (eq .Type "gifv") }}
|
||||
{{- include "videoPreview" $media | indent 4 }}
|
||||
{{- else if eq .Type "image" }}
|
||||
{{- include "imagePreview" $media | indent 4 }}
|
||||
|
|
@ -107,11 +107,17 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{
|
|||
{{- include "audioPreview" $media | indent 4 }}
|
||||
{{- end }}
|
||||
</summary>
|
||||
{{- if eq .Type "video" }}
|
||||
{{- if or (eq .Type "video") (eq .Type "gifv") }}
|
||||
<video
|
||||
{{- if eq .Type "video" }}
|
||||
preload="none"
|
||||
class="plyr-video photoswipe-slide"
|
||||
{{- else }}
|
||||
preload="auto"
|
||||
muted
|
||||
{{- end }}
|
||||
class="plyr-video photoswipe-slide{{- if eq .Type "gifv" }} gifv{{ end }}"
|
||||
controls
|
||||
playsinline
|
||||
data-pswp-index="{{- $index -}}"
|
||||
poster="{{- .PreviewURL -}}"
|
||||
data-pswp-width="{{- $media.Meta.Small.Width -}}px"
|
||||
|
|
@ -128,6 +134,7 @@ media photoswipe-gallery {{ (len .) | oddOrEven }} {{ if eq (len .) 1 }}single{{
|
|||
preload="none"
|
||||
class="plyr-video photoswipe-slide"
|
||||
controls
|
||||
playsinline
|
||||
data-pswp-index="{{- $index -}}"
|
||||
{{- if and $media.PreviewURL $media.Meta.Small.Width }}
|
||||
poster="{{- .PreviewURL -}}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue