From 6f42628428c3e18ad7625feff14d4f6b0c35f192 Mon Sep 17 00:00:00 2001 From: Maurice Parker Date: Fri, 30 Oct 2020 17:09:01 -0500 Subject: [PATCH] Treat animated gifs different from regular video --- .../FeedProvider/Reddit/RedditLink.swift | 17 ++++++++- .../FeedProvider/Reddit/RedditPreview.swift | 38 ++++++++++++++++++- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/Account/Sources/Account/FeedProvider/Reddit/RedditLink.swift b/Account/Sources/Account/FeedProvider/Reddit/RedditLink.swift index 3ec8aa295..1e859f81f 100644 --- a/Account/Sources/Account/FeedProvider/Reddit/RedditLink.swift +++ b/Account/Sources/Account/FeedProvider/Reddit/RedditLink.swift @@ -109,12 +109,25 @@ final class RedditLinkData: Codable { if let width = media?.video?.width, let height = media?.video?.height { html += "width=\"\(width)\" height=\"\(height)\" " } - html += "src=\"\(videoURL)\" autoplay muted loop>" + html += "src=\"\(videoURL)\">" + return html + } + + if let imageVariantURL = preview?.images?.first?.variants?.mp4?.source?.url { + var html = "" + html += linkURL(url) return html } if let videoPreviewURL = preview?.videoPreview?.url { - var html = "