commit 91b656f

grunfink  ·  2023-12-15 10:07:13 +0000 UTC
parents 3779587, b1b1627
Merge pull request 'html.c: media: disable preloading' (#87) from Yonle/snac2:master into master

Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/87
1 files changed,  +2, -0
M html.c
M html.c
+2, -0
 1@@ -1657,6 +1657,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local,
 2             if (xs_startswith(t, "video/")) {
 3                 xs_html_add(content_attachments,
 4                     xs_html_tag("video",
 5+                        xs_html_attr("preload", "none"),
 6                         xs_html_attr("style", "width: 100%"),
 7                         xs_html_attr("class", "snac-embedded-video"),
 8                         xs_html_attr("controls", NULL),
 9@@ -1671,6 +1672,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local,
10             if (xs_startswith(t, "audio/")) {
11                 xs_html_add(content_attachments,
12                     xs_html_tag("audio",
13+                        xs_html_attr("preload", "none"),
14                         xs_html_attr("style", "width: 100%"),
15                         xs_html_attr("class", "snac-embedded-audio"),
16                         xs_html_attr("controls", NULL),