diff --git a/public/style.css b/public/style.css index 4edca6a..7c39356 100644 --- a/public/style.css +++ b/public/style.css @@ -487,7 +487,7 @@ form.search { cursor: zoom-in; } -.attachment-image img { +.attachment-image img, .attachment-image video { border-radius: 6px; width: 100%; } diff --git a/src/View/Status.elm b/src/View/Status.elm index 98c8b9c..871e8e2 100644 --- a/src/View/Status.elm +++ b/src/View/Status.elm @@ -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