aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video')
-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 2aa5b8677..67395e5c0 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -270,7 +270,15 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
270 } 270 }
271 } 271 }
272 272
273 const url: ActivityUrlObject[] = [] 273 const url: ActivityUrlObject[] = [
274 // HTML url should be the first element in the array so Mastodon correctly displays the embed
275 {
276 type: 'Link',
277 mediaType: 'text/html',
278 href: WEBSERVER.URL + '/videos/watch/' + video.uuid
279 }
280 ]
281
274 addVideoFilesInAPAcc(url, video, baseUrlHttp, baseUrlWs, video.VideoFiles || []) 282 addVideoFilesInAPAcc(url, video, baseUrlHttp, baseUrlWs, video.VideoFiles || [])
275 283
276 for (const playlist of (video.VideoStreamingPlaylists || [])) { 284 for (const playlist of (video.VideoStreamingPlaylists || [])) {
@@ -296,13 +304,6 @@ function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
296 }) 304 })
297 } 305 }
298 306
299 // Add video url too
300 url.push({
301 type: 'Link',
302 mediaType: 'text/html',
303 href: WEBSERVER.URL + '/videos/watch/' + video.uuid
304 })
305
306 const subtitleLanguage = [] 307 const subtitleLanguage = []
307 for (const caption of video.VideoCaptions) { 308 for (const caption of video.VideoCaptions) {
308 subtitleLanguage.push({ 309 subtitleLanguage.push({