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

Support additional video extensions

This commit is contained in:
Chocobozzz 2018-12-11 14:52:50 +01:00
parent 8923187455
commit 14e2014acc
39 changed files with 268 additions and 90 deletions

View file

@ -2,7 +2,7 @@ import { Video, VideoDetails, VideoFile } from '../../../shared/models/videos'
import { VideoModel } from './video'
import { VideoFileModel } from './video-file'
import { ActivityUrlObject, VideoTorrentObject } from '../../../shared/models/activitypub/objects'
import { CONFIG, THUMBNAILS_SIZE, VIDEO_EXT_MIMETYPE } from '../../initializers'
import { CONFIG, MIMETYPES, THUMBNAILS_SIZE } from '../../initializers'
import { VideoCaptionModel } from './video-caption'
import {
getVideoCommentsActivityPubUrl,
@ -207,8 +207,8 @@ function videoModelToActivityPubObject (video: VideoModel): VideoTorrentObject {
for (const file of video.VideoFiles) {
url.push({
type: 'Link',
mimeType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
mediaType: VIDEO_EXT_MIMETYPE[ file.extname ] as any,
mimeType: MIMETYPES.VIDEO.EXT_MIMETYPE[ file.extname ] as any,
mediaType: MIMETYPES.VIDEO.EXT_MIMETYPE[ file.extname ] as any,
href: video.getVideoFileUrl(file, baseUrlHttp),
height: file.resolution,
size: file.size,