From 6f3ba10466a78d174d17594b8e2f0fe3a1ceb967 Mon Sep 17 00:00:00 2001 From: Michael Date: Sat, 14 Sep 2024 14:40:48 +0000 Subject: [PATCH] Bluesky: Preparation for video posts --- bluesky/bluesky.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bluesky/bluesky.php b/bluesky/bluesky.php index 181e8d2d..f4e2f456 100644 --- a/bluesky/bluesky.php +++ b/bluesky/bluesky.php @@ -1410,6 +1410,19 @@ function bluesky_add_media(stdClass $embed, array $item, int $fetch_uid, int $le } break; + case 'app.bsky.embed.video#view': + $media = [ + 'uri-id' => $item['uri-id'], + 'type' => Post\Media::HLS, + 'url' => $embed->playlist, + 'preview' => $embed->thumbnail, + 'description' => $embed->alt ?? '', + 'height' => $embed->aspectRatio->height, + 'width' => $embed->aspectRatio->width, + ]; + Post\Media::insert($media); + break; + case 'app.bsky.embed.external#view': $media = [ 'uri-id' => $item['uri-id'],