]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
dadde38af1aff5989f65b114c49f6ec9f1d2d338
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
1 import { Account, AccountSummary } from '../actors'
2 import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
3 import { VideoConstant } from './video-constant.model'
4 import { VideoFile } from './video-file.model'
5 import { VideoPrivacy } from './video-privacy.enum'
6 import { VideoScheduleUpdate } from './video-schedule-update.model'
7 import { VideoState } from './video-state.enum'
8 import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
9
10 export interface Video {
11 id: number
12 uuid: string
13 shortUUID: string
14
15 createdAt: Date | string
16 updatedAt: Date | string
17 publishedAt: Date | string
18 originallyPublishedAt: Date | string
19 category: VideoConstant<number>
20 licence: VideoConstant<number>
21 language: VideoConstant<string>
22 privacy: VideoConstant<VideoPrivacy>
23 description: string
24 duration: number
25 isLocal: boolean
26 name: string
27
28 isLive: boolean
29
30 thumbnailPath: string
31 thumbnailUrl?: string
32
33 previewPath: string
34 previewUrl?: string
35
36 embedPath: string
37 embedUrl?: string
38
39 url: string
40
41 views: number
42 likes: number
43 dislikes: number
44 nsfw: boolean
45
46 account: AccountSummary
47 channel: VideoChannelSummary
48
49 userHistory?: {
50 currentTime: number
51 }
52
53 pluginData?: any
54
55 // Additional attributes dependending on the query
56 waitTranscoding?: boolean
57 state?: VideoConstant<VideoState>
58 scheduledUpdate?: VideoScheduleUpdate
59
60 blacklisted?: boolean
61 blacklistedReason?: string
62
63 blockedOwner?: boolean
64 blockedServer?: boolean
65 }
66
67 export interface VideoDetails extends Video {
68 descriptionPath: string
69 support: string
70 channel: VideoChannel
71 account: Account
72 tags: string[]
73 files: VideoFile[]
74 commentsEnabled: boolean
75 downloadEnabled: boolean
76
77 // Not optional in details (unlike in parent Video)
78 waitTranscoding: boolean
79 state: VideoConstant<VideoState>
80
81 trackerUrls: string[]
82
83 streamingPlaylists: VideoStreamingPlaylist[]
84 }