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