commit b1b1627

Yonle  ·  2023-12-15 09:50:45 +0000 UTC
parent a5c740f
html.c: media: disable preloading

Signed-off-by: Yonle <yonle@lecturify.net>
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),