1
0
Fork 0
peertube/shared/models/videos/video.model.ts

96 lines
2.1 KiB
TypeScript
Raw Normal View History

2020-06-26 02:37:26 -04:00
import { Account, AccountSummary } from '../actors'
import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
2021-11-18 08:35:08 -05:00
import { VideoFile } from './file'
2020-06-26 02:37:26 -04:00
import { VideoConstant } from './video-constant.model'
2017-10-31 06:52:52 -04:00
import { VideoPrivacy } from './video-privacy.enum'
import { VideoScheduleUpdate } from './video-schedule-update.model'
2020-06-26 02:37:26 -04:00
import { VideoState } from './video-state.enum'
2019-01-29 02:37:25 -05:00
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
2017-06-10 16:15:25 -04:00
export interface Video {
id: number
uuid: string
shortUUID: string
createdAt: Date | string
updatedAt: Date | string
publishedAt: Date | string
2019-01-12 08:41:45 -05:00
originallyPublishedAt: Date | string
2018-03-19 05:24:12 -04:00
category: VideoConstant<number>
licence: VideoConstant<number>
2018-04-23 08:39:52 -04:00
language: VideoConstant<string>
privacy: VideoConstant<VideoPrivacy>
// Deprecated in 5.0 in favour of truncatedDescription
2017-06-11 05:02:35 -04:00
description: string
truncatedDescription: string
2017-06-11 05:02:35 -04:00
duration: number
isLocal: boolean
name: string
2020-05-29 10:16:24 -04:00
isLive: boolean
2017-06-11 05:02:35 -04:00
thumbnailPath: string
2020-05-29 10:16:24 -04:00
thumbnailUrl?: string
2017-07-12 05:56:02 -04:00
previewPath: string
2020-05-29 10:16:24 -04:00
previewUrl?: string
2017-10-16 04:05:49 -04:00
embedPath: string
2020-05-29 10:16:24 -04:00
embedUrl?: string
url: string
2020-05-29 10:16:24 -04:00
2017-06-11 05:02:35 -04:00
views: number
viewers: number
2017-06-11 05:02:35 -04:00
likes: number
dislikes: number
nsfw: boolean
2018-03-12 06:06:15 -04:00
2019-02-26 04:55:40 -05:00
account: AccountSummary
channel: VideoChannelSummary
2018-10-05 05:15:06 -04:00
userHistory?: {
currentTime: number
}
pluginData?: any
// Additional attributes dependending on the query
waitTranscoding?: boolean
state?: VideoConstant<VideoState>
scheduledUpdate?: VideoScheduleUpdate
blacklisted?: boolean
blacklistedReason?: string
blockedOwner?: boolean
blockedServer?: boolean
files?: VideoFile[]
streamingPlaylists?: VideoStreamingPlaylist[]
2017-10-24 13:41:09 -04:00
}
export interface VideoDetails extends Video {
// Deprecated in 5.0
2017-10-31 06:52:52 -04:00
descriptionPath: string
support: string
2017-10-24 13:41:09 -04:00
channel: VideoChannel
2019-06-11 04:01:13 -04:00
account: Account
2017-12-14 04:07:57 -05:00
tags: string[]
2018-01-03 04:12:36 -05:00
commentsEnabled: boolean
downloadEnabled: boolean
// Not optional in details (unlike in parent Video)
waitTranscoding: boolean
state: VideoConstant<VideoState>
2019-01-29 02:37:25 -05:00
trackerUrls: string[]
files: VideoFile[]
2019-01-29 02:37:25 -05:00
streamingPlaylists: VideoStreamingPlaylist[]
2017-06-10 16:15:25 -04:00
}