diff options
author | Chocobozzz <me@florianbigard.com> | 2020-02-04 09:20:16 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2020-02-04 09:20:16 +0100 |
commit | 7cd1b12c19d0589d1d692ed0571ca0800f028aea (patch) | |
tree | de277870182c6088becaa2f9098b260409f992c3 /server | |
parent | f51c02c77f0dcd25c2dc68a43e51d02d69efcb5a (diff) | |
parent | 22f18a4a197513c4cae685717829637cae853ae2 (diff) | |
download | PeerTube-7cd1b12c19d0589d1d692ed0571ca0800f028aea.tar.gz PeerTube-7cd1b12c19d0589d1d692ed0571ca0800f028aea.tar.zst PeerTube-7cd1b12c19d0589d1d692ed0571ca0800f028aea.zip |
Merge branch 'release/2.1.0' into develop
Diffstat (limited to 'server')
-rw-r--r-- | server/models/video/video-format-utils.ts | 17 |
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({ |