Add video preview support

I really need to stop maintaining this and switch to Tooty full-time,
but I haven't, so...
This commit is contained in:
Ryan Fox 2023-08-05 23:53:01 -07:00
parent 376c7ed70d
commit 7fb8981cbc
Signed by: flewkey
GPG Key ID: 94F56ADFD848851E
2 changed files with 18 additions and 1 deletions

View File

@ -487,7 +487,7 @@ form.search {
cursor: zoom-in;
}
.attachment-image img {
.attachment-image img, .attachment-image video {
border-radius: 6px;
width: 100%;
}

View File

@ -58,6 +58,23 @@ attachmentPreview context sensitive attachments ({ url, preview_url } as attachm
]
]
"video" ->
a
[ if nsfw then
class "attachment-image nsfw"
else
class "attachment-image"
]
[ video
[ controls True
, preload "auto"
, loop True
, controls True
]
[ source [ src url ] []
]
]
_ ->
a
[ if nsfw then