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