import { Video, VideoDetails } from '../../../shared/models/videos'
import { VideoModel } from './video'
-import { ActivityTagObject, ActivityUrlObject, VideoTorrentObject } from '../../../shared/models/activitypub/objects'
+import { ActivityTagObject, ActivityUrlObject, VideoObject } from '../../../shared/models/activitypub/objects'
import { MIMETYPES, WEBSERVER } from '../../initializers/constants'
import { VideoCaptionModel } from './video-caption'
import {
label: VideoModel.getPrivacyLabel(video.privacy)
},
nsfw: video.nsfw,
- description: options && options.completeDescription === true ? video.description : video.getTruncatedDescription(),
+
+ description: options && options.completeDescription === true
+ ? video.description
+ : video.getTruncatedDescription(),
+
isLocal: video.isOwned(),
duration: video.duration,
views: video.views,
publishedAt: video.publishedAt,
originallyPublishedAt: video.originallyPublishedAt,
+ isLive: video.isLive,
+
account: video.VideoChannel.Account.toFormattedSummaryJSON(),
channel: video.VideoChannel.toFormattedSummaryJSON(),
}
}
-function videoModelToActivityPubObject (video: MVideoAP): VideoTorrentObject {
+function videoModelToActivityPubObject (video: MVideoAP): VideoObject {
const { baseUrlHttp, baseUrlWs } = video.getBaseUrls()
if (!video.Tags) video.Tags = []
views: video.views,
sensitive: video.nsfw,
waitTranscoding: video.waitTranscoding,
+ isLiveBroadcast: video.isLive,
state: video.state,
commentsEnabled: video.commentsEnabled,
downloadEnabled: video.downloadEnabled,