ActivityUrlObject,
VideoTorrentObject
} from '../../../shared/models/activitypub/objects'
-import { CONFIG, MIMETYPES, THUMBNAILS_SIZE } from '../../initializers'
+import { MIMETYPES, WEBSERVER } from '../../initializers/constants'
import { VideoCaptionModel } from './video-caption'
import {
getVideoCommentsActivityPubUrl,
views: video.views,
likes: video.likes,
dislikes: video.dislikes,
- thumbnailPath: video.getThumbnailStaticPath(),
+ thumbnailPath: video.getMiniatureStaticPath(),
previewPath: video.getPreviewStaticPath(),
embedPath: video.getEmbedStaticPath(),
createdAt: video.createdAt,
type: 'Link',
mimeType: 'text/html',
mediaType: 'text/html',
- href: CONFIG.WEBSERVER.URL + '/videos/watch/' + video.uuid
+ href: WEBSERVER.URL + '/videos/watch/' + video.uuid
})
const subtitleLanguage = []
})
}
+ const miniature = video.getMiniature()
+
return {
type: 'Video' as 'Video',
id: video.url,
subtitleLanguage,
icon: {
type: 'Image',
- url: video.getThumbnailUrl(baseUrlHttp),
+ url: miniature.getFileUrl(),
mediaType: 'image/jpeg',
- width: THUMBNAILS_SIZE.width,
- height: THUMBNAILS_SIZE.height
+ width: miniature.width,
+ height: miniature.height
},
url,
likes: getVideoLikesActivityPubUrl(video),