2020-06-26 06:37:26 +00:00
|
|
|
import { Account, AccountSummary } from '../actors'
|
|
|
|
import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
|
2021-11-18 13:35:08 +00:00
|
|
|
import { VideoFile } from './file'
|
2020-06-26 06:37:26 +00:00
|
|
|
import { VideoConstant } from './video-constant.model'
|
2017-10-31 10:52:52 +00:00
|
|
|
import { VideoPrivacy } from './video-privacy.enum'
|
2018-06-15 14:52:15 +00:00
|
|
|
import { VideoScheduleUpdate } from './video-schedule-update.model'
|
2020-06-26 06:37:26 +00:00
|
|
|
import { VideoState } from './video-state.enum'
|
2019-01-29 07:37:25 +00:00
|
|
|
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
|
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
|
2021-06-28 15:30:59 +00:00
|
|
|
shortUUID: 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
|
2019-01-12 13:41:45 +00:00
|
|
|
originallyPublishedAt: 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
|
2020-05-29 14:16:24 +00:00
|
|
|
|
2020-09-17 07:20:52 +00:00
|
|
|
isLive: boolean
|
|
|
|
|
2017-06-11 09:02:35 +00:00
|
|
|
thumbnailPath: string
|
2020-05-29 14:16:24 +00:00
|
|
|
thumbnailUrl?: string
|
|
|
|
|
2017-07-12 09:56:02 +00:00
|
|
|
previewPath: string
|
2020-05-29 14:16:24 +00:00
|
|
|
previewUrl?: string
|
|
|
|
|
2017-10-16 08:05:49 +00:00
|
|
|
embedPath: string
|
2020-05-29 14:16:24 +00:00
|
|
|
embedUrl?: string
|
|
|
|
|
2021-10-22 12:11:58 +00:00
|
|
|
url: string
|
2020-05-29 14:16:24 +00:00
|
|
|
|
2017-06-11 09:02:35 +00:00
|
|
|
views: number
|
2021-11-09 09:11:20 +00:00
|
|
|
// If live
|
|
|
|
viewers?: number
|
|
|
|
|
2017-06-11 09:02:35 +00:00
|
|
|
likes: number
|
|
|
|
dislikes: number
|
|
|
|
nsfw: boolean
|
2018-03-12 10:06:15 +00:00
|
|
|
|
2019-02-26 09:55:40 +00:00
|
|
|
account: AccountSummary
|
|
|
|
channel: VideoChannelSummary
|
2018-10-05 09:15:06 +00:00
|
|
|
|
|
|
|
userHistory?: {
|
|
|
|
currentTime: number
|
|
|
|
}
|
2020-08-20 14:18:16 +00:00
|
|
|
|
|
|
|
pluginData?: any
|
2021-10-27 12:37:04 +00:00
|
|
|
|
|
|
|
// Additional attributes dependending on the query
|
|
|
|
waitTranscoding?: boolean
|
|
|
|
state?: VideoConstant<VideoState>
|
|
|
|
scheduledUpdate?: VideoScheduleUpdate
|
|
|
|
|
|
|
|
blacklisted?: boolean
|
|
|
|
blacklistedReason?: string
|
|
|
|
|
|
|
|
blockedOwner?: boolean
|
|
|
|
blockedServer?: boolean
|
2021-10-29 08:54:27 +00:00
|
|
|
|
|
|
|
files?: VideoFile[]
|
|
|
|
streamingPlaylists?: VideoStreamingPlaylist[]
|
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
|
2019-06-11 08:01:13 +00:00
|
|
|
account: Account
|
2017-12-14 09:07:57 +00:00
|
|
|
tags: string[]
|
2018-01-03 09:12:36 +00:00
|
|
|
commentsEnabled: boolean
|
2018-10-08 12:45:22 +00:00
|
|
|
downloadEnabled: boolean
|
2018-06-12 18:04:58 +00:00
|
|
|
|
2021-10-27 12:37:04 +00:00
|
|
|
// Not optional in details (unlike in parent Video)
|
2018-06-12 18:04:58 +00:00
|
|
|
waitTranscoding: boolean
|
|
|
|
state: VideoConstant<VideoState>
|
2019-01-29 07:37:25 +00:00
|
|
|
|
|
|
|
trackerUrls: string[]
|
|
|
|
|
2021-10-29 08:54:27 +00:00
|
|
|
files: VideoFile[]
|
2019-01-29 07:37:25 +00:00
|
|
|
streamingPlaylists: VideoStreamingPlaylist[]
|
2017-06-10 20:15:25 +00:00
|
|
|
}
|