aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/models/video/video-format-utils.ts
diff options
context:
space:
mode:
Diffstat (limited to 'server/models/video/video-format-utils.ts')
-rw-r--r--server/models/video/video-format-utils.ts4
1 files changed, 4 insertions, 0 deletions
diff --git a/server/models/video/video-format-utils.ts b/server/models/video/video-format-utils.ts
index 905e84449..e3f8d525b 100644
--- a/server/models/video/video-format-utils.ts
+++ b/server/models/video/video-format-utils.ts
@@ -208,6 +208,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
208 url.push({ 208 url.push({
209 type: 'Link', 209 type: 'Link',
210 mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any, 210 mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
211 mediaType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
211 href: video.getVideoFileUrl(file, baseUrlHttp), 212 href: video.getVideoFileUrl(file, baseUrlHttp),
212 height: file.resolution, 213 height: file.resolution,
213 size: file.size, 214 size: file.size,
@@ -217,6 +218,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
217 url.push({ 218 url.push({
218 type: 'Link', 219 type: 'Link',
219 mimeType: 'application/x-bittorrent' as 'application/x-bittorrent', 220 mimeType: 'application/x-bittorrent' as 'application/x-bittorrent',
221 mediaType: 'application/x-bittorrent' as 'application/x-bittorrent',
220 href: video.getTorrentUrl(file, baseUrlHttp), 222 href: video.getTorrentUrl(file, baseUrlHttp),
221 height: file.resolution 223 height: file.resolution
222 }) 224 })
@@ -224,6 +226,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
224 url.push({ 226 url.push({
225 type: 'Link', 227 type: 'Link',
226 mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet', 228 mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
229 mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
227 href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs), 230 href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs),
228 height: file.resolution 231 height: file.resolution
229 }) 232 })
@@ -233,6 +236,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
233 url.push({ 236 url.push({
234 type: 'Link', 237 type: 'Link',
235 mimeType: 'text/html', 238 mimeType: 'text/html',
239 mediaType: 'text/html',
236 href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid 240 href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
237 }) 241 })
238 242