]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Add ability to filter out public videos from admin
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
583eb04b
C
1import { Account, AccountSummary } from '../actors'
2import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
3import { VideoConstant } from './video-constant.model'
4import { VideoFile } from './video-file.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
583eb04b 7import { VideoState } from './video-state.enum'
09209296 8import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
93e1258c 9
69818c93 10export interface Video {
0a6658fd
C
11 id: number
12 uuid: string
d4a8e7a6
C
13 shortUUID: string
14
d592e0a9
C
15 createdAt: Date | string
16 updatedAt: Date | string
2922e048 17 publishedAt: Date | string
c8034165 18 originallyPublishedAt: Date | string
ae5a3dd6
C
19 category: VideoConstant<number>
20 licence: VideoConstant<number>
9d3ef9fe 21 language: VideoConstant<string>
2243730c 22 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
23 description: string
24 duration: number
25 isLocal: boolean
69f616ab 26 name: string
5fb2e288 27
c6c0fa6c
C
28 isLive: boolean
29
69f616ab 30 thumbnailPath: string
5fb2e288
C
31 thumbnailUrl?: string
32
f981dae8 33 previewPath: string
5fb2e288
C
34 previewUrl?: string
35
d8755eed 36 embedPath: string
5fb2e288
C
37 embedUrl?: string
38
ab4001aa 39 url: string
5fb2e288 40
69f616ab 41 views: number
51353d9a
C
42 // If live
43 viewers?: number
44
69f616ab
C
45 likes: number
46 dislikes: number
47 nsfw: boolean
b64c950a 48
418d092a
C
49 account: AccountSummary
50 channel: VideoChannelSummary
6e46de09
C
51
52 userHistory?: {
53 currentTime: number
54 }
7294aab0
C
55
56 pluginData?: any
2760b454
C
57
58 // Additional attributes dependending on the query
59 waitTranscoding?: boolean
60 state?: VideoConstant<VideoState>
61 scheduledUpdate?: VideoScheduleUpdate
62
63 blacklisted?: boolean
64 blacklistedReason?: string
65
66 blockedOwner?: boolean
67 blockedServer?: boolean
3c10840f
C
68
69 files?: VideoFile[]
70 streamingPlaylists?: VideoStreamingPlaylist[]
72c7248b
C
71}
72
73export interface VideoDetails extends Video {
fd45e8f4 74 descriptionPath: string
2422c46b 75 support: string
72c7248b 76 channel: VideoChannel
5dce26d2 77 account: Account
d48ff09d 78 tags: string[]
47564bbe 79 commentsEnabled: boolean
7f2cfe3a 80 downloadEnabled: boolean
2186386c 81
2760b454 82 // Not optional in details (unlike in parent Video)
2186386c
C
83 waitTranscoding: boolean
84 state: VideoConstant<VideoState>
09209296
C
85
86 trackerUrls: string[]
87
3c10840f 88 files: VideoFile[]
09209296 89 streamingPlaylists: VideoStreamingPlaylist[]
69818c93 90}