2020-06-26 08:37:26 +02:00
|
|
|
import { Account, AccountSummary } from '../actors'
|
|
|
|
import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
|
2021-11-18 14:35:08 +01:00
|
|
|
import { VideoFile } from './file'
|
2020-06-26 08:37:26 +02:00
|
|
|
import { VideoConstant } from './video-constant.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'
|
2020-06-26 08:37:26 +02:00
|
|
|
import { VideoState } from './video-state.enum'
|
2019-01-29 08:37:25 +01:00
|
|
|
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
|
2017-08-25 11:36:23 +02:00
|
|
|
|
2017-06-10 22:15:25 +02:00
|
|
|
export interface Video {
|
2017-07-11 16:01:56 +02:00
|
|
|
id: number
|
|
|
|
uuid: string
|
2021-06-28 17:30:59 +02:00
|
|
|
shortUUID: 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
|
2019-01-12 14:41:45 +01:00
|
|
|
originallyPublishedAt: 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>
|
2022-11-14 12:06:31 +01:00
|
|
|
|
|
|
|
// Deprecated in 5.0 in favour of truncatedDescription
|
2017-06-11 11:02:35 +02:00
|
|
|
description: string
|
2022-11-14 12:06:31 +01:00
|
|
|
truncatedDescription: string
|
|
|
|
|
2017-06-11 11:02:35 +02:00
|
|
|
duration: number
|
|
|
|
isLocal: boolean
|
|
|
|
name: string
|
2020-05-29 16:16:24 +02:00
|
|
|
|
2020-09-17 09:20:52 +02:00
|
|
|
isLive: boolean
|
|
|
|
|
2017-06-11 11:02:35 +02:00
|
|
|
thumbnailPath: string
|
2020-05-29 16:16:24 +02:00
|
|
|
thumbnailUrl?: string
|
|
|
|
|
2017-07-12 11:56:02 +02:00
|
|
|
previewPath: string
|
2020-05-29 16:16:24 +02:00
|
|
|
previewUrl?: string
|
|
|
|
|
2017-10-16 10:05:49 +02:00
|
|
|
embedPath: string
|
2020-05-29 16:16:24 +02:00
|
|
|
embedUrl?: string
|
|
|
|
|
2021-10-22 14:11:58 +02:00
|
|
|
url: string
|
2020-05-29 16:16:24 +02:00
|
|
|
|
2017-06-11 11:02:35 +02:00
|
|
|
views: number
|
2022-03-24 13:36:47 +01:00
|
|
|
viewers: number
|
2021-11-09 10:11:20 +01:00
|
|
|
|
2017-06-11 11:02:35 +02:00
|
|
|
likes: number
|
|
|
|
dislikes: number
|
|
|
|
nsfw: boolean
|
2018-03-12 11:06:15 +01:00
|
|
|
|
2019-02-26 10:55:40 +01:00
|
|
|
account: AccountSummary
|
|
|
|
channel: VideoChannelSummary
|
2018-10-05 11:15:06 +02:00
|
|
|
|
|
|
|
userHistory?: {
|
|
|
|
currentTime: number
|
|
|
|
}
|
2020-08-20 16:18:16 +02:00
|
|
|
|
|
|
|
pluginData?: any
|
2021-10-27 14:37:04 +02: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 10:54:27 +02:00
|
|
|
|
|
|
|
files?: VideoFile[]
|
|
|
|
streamingPlaylists?: VideoStreamingPlaylist[]
|
2017-10-24 19:41:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
export interface VideoDetails extends Video {
|
2022-11-14 12:06:31 +01:00
|
|
|
// Deprecated in 5.0
|
2017-10-31 11:52:52 +01:00
|
|
|
descriptionPath: string
|
2022-11-14 12:06:31 +01:00
|
|
|
|
2018-02-15 14:46:26 +01:00
|
|
|
support: string
|
2017-10-24 19:41:09 +02:00
|
|
|
channel: VideoChannel
|
2019-06-11 10:01:13 +02:00
|
|
|
account: Account
|
2017-12-14 10:07:57 +01:00
|
|
|
tags: string[]
|
2018-01-03 10:12:36 +01:00
|
|
|
commentsEnabled: boolean
|
2018-10-08 14:45:22 +02:00
|
|
|
downloadEnabled: boolean
|
2018-06-12 20:04:58 +02:00
|
|
|
|
2021-10-27 14:37:04 +02:00
|
|
|
// Not optional in details (unlike in parent Video)
|
2018-06-12 20:04:58 +02:00
|
|
|
waitTranscoding: boolean
|
|
|
|
state: VideoConstant<VideoState>
|
2019-01-29 08:37:25 +01:00
|
|
|
|
|
|
|
trackerUrls: string[]
|
|
|
|
|
2021-10-29 10:54:27 +02:00
|
|
|
files: VideoFile[]
|
2019-01-29 08:37:25 +01:00
|
|
|
streamingPlaylists: VideoStreamingPlaylist[]
|
2017-06-10 22:15:25 +02:00
|
|
|
}
|