]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
Merge branch 'release/3.3.0' into develop
[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 // When using the search index
40 url?: string
41
42 views: number
43 likes: number
44 dislikes: number
45 nsfw: boolean
46
47 waitTranscoding?: boolean
48 state?: VideoConstant<VideoState>
49 scheduledUpdate?: VideoScheduleUpdate
50
51 blacklisted?: boolean
52 blacklistedReason?: string
53
54 account: AccountSummary
55 channel: VideoChannelSummary
56
57 userHistory?: {
58 currentTime: number
59 }
60
61 pluginData?: any
62 }
63
64 export interface VideoDetails extends Video {
65 descriptionPath: string
66 support: string
67 channel: VideoChannel
68 account: Account
69 tags: string[]
70 files: VideoFile[]
71 commentsEnabled: boolean
72 downloadEnabled: boolean
73
74 // Not optional in details (unlike in Video)
75 waitTranscoding: boolean
76 state: VideoConstant<VideoState>
77
78 trackerUrls: string[]
79
80 streamingPlaylists: VideoStreamingPlaylist[]
81 }