1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-05 19:42:24 +02:00

AP mimeType -> mediaType

This commit is contained in:
Chocobozzz 2018-10-18 08:48:24 +02:00
parent 244b4ae397
commit e27ff5da6e
No known key found for this signature in database
GPG key ID: 583A612D890159BE
5 changed files with 24 additions and 9 deletions

View file

@ -208,6 +208,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
url.push({
type: 'Link',
mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
mediaType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
href: video.getVideoFileUrl(file, baseUrlHttp),
height: file.resolution,
size: file.size,
@ -217,6 +218,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
url.push({
type: 'Link',
mimeType: 'application/x-bittorrent' as 'application/x-bittorrent',
mediaType: 'application/x-bittorrent' as 'application/x-bittorrent',
href: video.getTorrentUrl(file, baseUrlHttp),
height: file.resolution
})
@ -224,6 +226,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
url.push({
type: 'Link',
mimeType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
mediaType: 'application/x-bittorrent;x-scheme-handler/magnet' as 'application/x-bittorrent;x-scheme-handler/magnet',
href: video.generateMagnetUri(file, baseUrlHttp, baseUrlWs),
height: file.resolution
})
@ -233,6 +236,7 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
url.push({
type: 'Link',
mimeType: 'text/html',
mediaType: 'text/html',
href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
})