2018-03-19 10:04:40 +00:00
|
|
|
import { VideoResolution } from '../../index'
|
2017-12-14 16:38:41 +00:00
|
|
|
import { Account } from '../actors'
|
2018-03-12 10:06:15 +00:00
|
|
|
import { Avatar } from '../avatars/avatar.model'
|
2017-10-24 17:41:09 +00:00
|
|
|
import { VideoChannel } from './video-channel.model'
|
2017-10-31 10:52:52 +00:00
|
|
|
import { VideoPrivacy } from './video-privacy.enum'
|
2017-10-24 17:41:09 +00:00
|
|
|
|
2018-03-19 09:24:12 +00:00
|
|
|
export interface VideoConstant <T> {
|
2018-04-23 12:39:52 +00:00
|
|
|
id: T
|
2018-03-19 09:24:12 +00:00
|
|
|
label: string
|
|
|
|
}
|
|
|
|
|
2017-08-25 09:36:23 +00:00
|
|
|
export interface VideoFile {
|
|
|
|
magnetUri: string
|
2018-03-19 10:04:40 +00:00
|
|
|
resolution: VideoConstant<VideoResolution>
|
2017-08-25 09:36:23 +00:00
|
|
|
size: number // Bytes
|
2017-10-19 12:58:28 +00:00
|
|
|
torrentUrl: string
|
|
|
|
fileUrl: string
|
2017-08-25 09:36:23 +00:00
|
|
|
}
|
|
|
|
|
2017-06-10 20:15:25 +00:00
|
|
|
export interface Video {
|
2017-07-11 14:01:56 +00:00
|
|
|
id: number
|
|
|
|
uuid: string
|
2017-09-14 09:57:49 +00:00
|
|
|
createdAt: Date | string
|
|
|
|
updatedAt: Date | string
|
2018-03-28 21:38:52 +00:00
|
|
|
publishedAt: Date | string
|
2018-03-19 09:24:12 +00:00
|
|
|
category: VideoConstant<number>
|
|
|
|
licence: VideoConstant<number>
|
2018-04-23 12:39:52 +00:00
|
|
|
language: VideoConstant<string>
|
2018-04-19 12:52:10 +00:00
|
|
|
privacy: VideoConstant<VideoPrivacy>
|
2017-06-11 09:02:35 +00:00
|
|
|
description: string
|
|
|
|
duration: number
|
|
|
|
isLocal: boolean
|
|
|
|
name: string
|
|
|
|
thumbnailPath: string
|
2017-07-12 09:56:02 +00:00
|
|
|
previewPath: string
|
2017-10-16 08:05:49 +00:00
|
|
|
embedPath: string
|
2017-06-11 09:02:35 +00:00
|
|
|
views: number
|
|
|
|
likes: number
|
|
|
|
dislikes: number
|
|
|
|
nsfw: boolean
|
2018-03-12 10:06:15 +00:00
|
|
|
|
|
|
|
account: {
|
2018-04-25 12:32:19 +00:00
|
|
|
id: number
|
|
|
|
uuid: string
|
2018-03-12 10:06:15 +00:00
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
url: string
|
|
|
|
host: string
|
|
|
|
avatar: Avatar
|
|
|
|
}
|
2018-05-11 13:10:13 +00:00
|
|
|
|
|
|
|
channel: {
|
|
|
|
id: number
|
|
|
|
uuid: string
|
|
|
|
name: string
|
|
|
|
displayName: string
|
|
|
|
url: string
|
|
|
|
host: string
|
|
|
|
avatar: Avatar
|
|
|
|
}
|
2017-10-24 17:41:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoDetails extends Video {
|
2017-10-31 10:52:52 +00:00
|
|
|
descriptionPath: string
|
2018-02-15 13:46:26 +00:00
|
|
|
support: string
|
2017-10-24 17:41:09 +00:00
|
|
|
channel: VideoChannel
|
2017-12-14 09:07:57 +00:00
|
|
|
tags: string[]
|
2017-08-25 09:36:23 +00:00
|
|
|
files: VideoFile[]
|
2017-12-06 16:15:59 +00:00
|
|
|
account: Account
|
2018-01-03 09:12:36 +00:00
|
|
|
commentsEnabled: boolean
|
2017-06-10 20:15:25 +00:00
|
|
|
}
|