From 468bfcd55a709da7ed03d1ad278ffe0e6d885c88 Mon Sep 17 00:00:00 2001
From: AiraNadih <128119996+AiraNadih@users.noreply.github.com>
Date: Sun, 10 Nov 2024 19:52:35 +0800
Subject: [PATCH] feat(route/bsky): replace video thumbnail with video player
(#17499)
* feat(route/bsky): replace video thumbnail with video player
* Update lib/routes/bsky/templates/post.art
---------
---
lib/routes/bsky/posts.ts | 1 -
lib/routes/bsky/templates/post.art | 9 ++++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/routes/bsky/posts.ts b/lib/routes/bsky/posts.ts
index dda7eb999ec31a..20c15a7bed58bc 100644
--- a/lib/routes/bsky/posts.ts
+++ b/lib/routes/bsky/posts.ts
@@ -63,7 +63,6 @@ async function handler(ctx) {
text: post.record.text.replaceAll('\n', '
'),
embed: post.embed,
// embed.$type "app.bsky.embed.record#view" and "app.bsky.embed.recordWithMedia#view" are not handled
- // "app.bsky.embed.video#view" is rendered as image
}),
author: post.author.displayName,
pubDate: parseDate(post.record.createdAt),
diff --git a/lib/routes/bsky/templates/post.art b/lib/routes/bsky/templates/post.art
index 54edbfc88b000d..80d41fea1844ca 100644
--- a/lib/routes/bsky/templates/post.art
+++ b/lib/routes/bsky/templates/post.art
@@ -8,7 +8,14 @@
{{ /each }}
{{ else if embed.$type === 'app.bsky.embed.video#view' }}
-
+
{{ else if embed.$type === 'app.bsky.embed.external#view' }}
{{ embed.external.title }}
{{ embed.external.description }}