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:
parent
244b4ae397
commit
e27ff5da6e
5 changed files with 24 additions and 9 deletions
|
@ -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
|
||||
})
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue