2018-06-12 14:04:58 -04:00
|
|
|
import { VideoResolution, VideoState } from '../../index'
|
2017-12-14 11:38:41 -05:00
|
|
|
import { Account } from '../actors'
|
2018-03-12 06:06:15 -04:00
|
|
|
import { Avatar } from '../avatars/avatar.model'
|
2018-08-14 08:59:53 -04:00
|
|
|
import { VideoChannel } from './channel/video-channel.model'
|
2017-10-31 06:52:52 -04:00
|
|
|
import { VideoPrivacy } from './video-privacy.enum'
|
2018-06-15 10:52:15 -04:00
|
|
|
import { VideoScheduleUpdate } from './video-schedule-update.model'
|
2018-07-12 13:02:00 -04:00
|
|
|
import { VideoConstant } from './video-constant.model'
|
2018-03-19 05:24:12 -04:00
|
|
|
|
2017-08-25 05:36:23 -04:00
|
|
|
export interface VideoFile {
|
|
|
|
magnetUri: string
|
2018-03-19 06:04:40 -04:00
|
|
|
resolution: VideoConstant<VideoResolution>
|
2017-08-25 05:36:23 -04:00
|
|
|
size: number // Bytes
|
2017-10-19 08:58:28 -04:00
|
|
|
torrentUrl: string
|
2018-05-29 12:30:11 -04:00
|
|
|
torrentDownloadUrl: string
|
2017-10-19 08:58:28 -04:00
|
|
|
fileUrl: string
|
2018-05-29 12:30:11 -04:00
|
|
|
fileDownloadUrl: string
|
2018-06-29 10:41:29 -04:00
|
|
|
fps: number
|
2017-08-25 05:36:23 -04:00
|
|
|
}
|
|
|
|
|
2017-06-10 16:15:25 -04:00
|
|
|
export interface Video {
|
2017-07-11 10:01:56 -04:00
|
|
|
id: number
|
|
|
|
uuid: string
|
2017-09-14 05:57:49 -04:00
|
|
|
createdAt: Date | string
|
|
|
|
updatedAt: Date | string
|
2018-03-28 17:38:52 -04:00
|
|
|
publishedAt: Date | string
|
2018-03-19 05:24:12 -04:00
|
|
|
category: VideoConstant<number>
|
|
|
|
licence: VideoConstant<number>
|
2018-04-23 08:39:52 -04:00
|
|
|
language: VideoConstant<string>
|
2018-04-19 08:52:10 -04:00
|
|
|
privacy: VideoConstant<VideoPrivacy>
|
2017-06-11 05:02:35 -04:00
|
|
|
description: string
|
|
|
|
duration: number
|
|
|
|
isLocal: boolean
|
|
|
|
name: string
|
|
|
|
thumbnailPath: string
|
2017-07-12 05:56:02 -04:00
|
|
|
previewPath: string
|
2017-10-16 04:05:49 -04:00
|
|
|
embedPath: string
|
2017-06-11 05:02:35 -04:00
|
|
|
views: number
|
|
|
|
likes: number
|
|
|
|
dislikes: number
|
|
|
|
nsfw: boolean
|
2018-03-12 06:06:15 -04:00
|
|
|
|
2018-06-12 14:04:58 -04:00
|
|
|
waitTranscoding?: boolean
|
|
|
|
state?: VideoConstant<VideoState>
|
2018-06-15 10:52:15 -04:00
|
|
|
scheduledUpdate?: VideoScheduleUpdate
|
2018-06-12 14:04:58 -04:00
|
|
|
|
2018-08-13 10:57:13 -04:00
|
|
|
blacklisted?: boolean
|
|
|
|
blacklistedReason?: string
|
|
|
|
|
2018-03-12 06:06:15 -04:00
|
|
|
account: {
|
2018-04-25 08:32:19 -04:00
|
|
|
id: number
|
|
|
|
uuid: string
|
2018-03-12 06:06:15 -04:00
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
url: string
|
|
|
|
host: string
|
|
|
|
avatar: Avatar
|
|
|
|
}
|
2018-05-11 09:10:13 -04:00
|
|
|
|
|
|
|
channel: {
|
|
|
|
id: number
|
|
|
|
uuid: string
|
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
url: string
|
|
|
|
host: string
|
|
|
|
avatar: Avatar
|
|
|
|
}
|
2017-10-24 13:41:09 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoDetails extends Video {
|
2017-10-31 06:52:52 -04:00
|
|
|
descriptionPath: string
|
2018-02-15 08:46:26 -05:00
|
|
|
support: string
|
2017-10-24 13:41:09 -04:00
|
|
|
channel: VideoChannel
|
2017-12-14 04:07:57 -05:00
|
|
|
tags: string[]
|
2017-08-25 05:36:23 -04:00
|
|
|
files: VideoFile[]
|
2017-12-06 11:15:59 -05:00
|
|
|
account: Account
|
2018-01-03 04:12:36 -05:00
|
|
|
commentsEnabled: boolean
|
2018-06-12 14:04:58 -04:00
|
|
|
|
|
|
|
// Not optional in details (unlike in Video)
|
|
|
|
waitTranscoding: boolean
|
|
|
|
state: VideoConstant<VideoState>
|
2017-06-10 16:15:25 -04:00
|
|
|
}
|