From 546c8a4cda3d7f5a98818776a1d83c580c011c3a Mon Sep 17 00:00:00 2001
From: mikupls <93015331+mikupls@users.noreply.github.com>
Date: Sat, 23 Oct 2021 23:25:51 +0200
Subject: [PATCH] Add poster attribute and disable autoplay on GIFs
* Add the poster attribute even if a post claims to be type gif. Default to none-preloading for gifs like video-typed posts do.
* Disable autoplay for videos in feeds
Co-authored-by: Spike <19519553+spikecodes@users.noreply.github.com>
---
templates/utils.html | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/templates/utils.html b/templates/utils.html
index 1b54d1e..8d49b0d 100644
--- a/templates/utils.html
+++ b/templates/utils.html
@@ -99,7 +99,7 @@
{% else if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "gif" %}
-
+
{% else if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "video" %}
{% if prefs.use_hls == "on" && !post.media.alt_url.is_empty() %}
{% else %}
-
+
{% call render_hls_notification(format!("{}%23{}", &self.url[1..].replace("&", "%26").replace("+", "%2B"), post.id)) %}
{% endif %}
{% else if post.post_type != "self" %}