aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--server/models/video/video-format-utils.ts17
1 files changed, 9 insertions, 8 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 55b0ed062..1fa66fd63 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -269,7 +269,15 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
269 } 269 }
270 } 270 }
271 271
272 const url: ActivityUrlObject[] = [] 272 const url: ActivityUrlObject[] = [
273 // HTML url should be the first element in the array so Mastodon correctly displays the embed
274 {
275 type: 'Link',
276 mediaType: 'text/html',
277 href: WEBSERVER.URL + '/videos/watch/' + video.uuid
278 }
279 ]
280
273 addVideoFilesInAPAcc(url, video, baseUrlHttp, baseUrlWs, video.VideoFiles || []) 281 addVideoFilesInAPAcc(url, video, baseUrlHttp, baseUrlWs, video.VideoFiles || [])
274 282
275 for (const playlist of (video.VideoStreamingPlaylists || [])) { 283 for (const playlist of (video.VideoStreamingPlaylists || [])) {
@@ -293,13 +301,6 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
293 }) 301 })
294 } 302 }
295 303
296 // Add video url too
297 url.push({
298 type: 'Link',
299 mediaType: 'text/html',
300 href: WEBSERVER.URL + '/videos/watch/' + video.uuid
301 })
302
303 const subtitleLanguage = [] 304 const subtitleLanguage = []
304 for (const caption of video.VideoCaptions) { 305 for (const caption of video.VideoCaptions) {
305 subtitleLanguage.push({ 306 subtitleLanguage.push({