PeerTube/shared/models/videos/video.model.ts

76 lines
1.7 KiB
TypeScript
Raw Normal View History

2020-01-10 03:11:28 -06:00
import { AccountSummary, VideoChannelSummary, VideoState } from '../../index'
2017-12-14 10:38:41 -06:00
import { Account } from '../actors'
2018-08-14 07:59:53 -05:00
import { VideoChannel } from './channel/video-channel.model'
2017-10-31 05:52:52 -05:00
import { VideoPrivacy } from './video-privacy.enum'
import { VideoScheduleUpdate } from './video-schedule-update.model'
2018-07-12 12:02:00 -05:00
import { VideoConstant } from './video-constant.model'
2019-01-29 01:37:25 -06:00
import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
import { VideoFile } from './video-file.model'
2017-06-10 15:15:25 -05:00
export interface Video {
id: number
uuid: string
createdAt: Date | string
updatedAt: Date | string
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>
privacy: VideoConstant<VideoPrivacy>
2017-06-11 04:02:35 -05:00
description: string
duration: number
isLocal: boolean
name: string
2020-05-29 09:16:24 -05:00
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
// When using the search index
url?: string
2017-06-11 04:02:35 -05:00
views: number
likes: number
dislikes: number
nsfw: boolean
2018-03-12 05:06:15 -05:00
waitTranscoding?: boolean
state?: VideoConstant<VideoState>
scheduledUpdate?: VideoScheduleUpdate
2018-08-13 09:57:13 -05:00
blacklisted?: boolean
blacklistedReason?: string
2019-02-26 03:55:40 -06:00
account: AccountSummary
channel: VideoChannelSummary
2018-10-05 04:15:06 -05:00
userHistory?: {
currentTime: number
}
2017-10-24 12:41:09 -05:00
}
export interface VideoDetails extends Video {
2017-10-31 05:52:52 -05:00
descriptionPath: string
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[]
files: VideoFile[]
2018-01-03 03:12:36 -06:00
commentsEnabled: boolean
downloadEnabled: boolean
// Not optional in details (unlike in Video)
waitTranscoding: boolean
state: VideoConstant<VideoState>
2019-01-29 01:37:25 -06:00
trackerUrls: string[]
streamingPlaylists: VideoStreamingPlaylist[]
2017-06-10 15:15:25 -05:00
}