浏览代码

html.c: media: disable preloading

Signed-off-by: Yonle <yonle@lecturify.net>
Yonle 2 年之前
父节点
当前提交
b1b1627fb4
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      html.c

+ 2 - 0
html.c

@@ -1657,6 +1657,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local,
             if (xs_startswith(t, "video/")) {
             if (xs_startswith(t, "video/")) {
                 xs_html_add(content_attachments,
                 xs_html_add(content_attachments,
                     xs_html_tag("video",
                     xs_html_tag("video",
+                        xs_html_attr("preload", "none"),
                         xs_html_attr("style", "width: 100%"),
                         xs_html_attr("style", "width: 100%"),
                         xs_html_attr("class", "snac-embedded-video"),
                         xs_html_attr("class", "snac-embedded-video"),
                         xs_html_attr("controls", NULL),
                         xs_html_attr("controls", NULL),
@@ -1671,6 +1672,7 @@ xs_html *html_entry(snac *user, xs_dict *msg, int local,
             if (xs_startswith(t, "audio/")) {
             if (xs_startswith(t, "audio/")) {
                 xs_html_add(content_attachments,
                 xs_html_add(content_attachments,
                     xs_html_tag("audio",
                     xs_html_tag("audio",
+                        xs_html_attr("preload", "none"),
                         xs_html_attr("style", "width: 100%"),
                         xs_html_attr("style", "width: 100%"),
                         xs_html_attr("class", "snac-embedded-audio"),
                         xs_html_attr("class", "snac-embedded-audio"),
                         xs_html_attr("controls", NULL),
                         xs_html_attr("controls", NULL),