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