]>
Commit | Line | Data |
---|---|---|
1 | import { Account, AccountSummary } from '../actors' | |
2 | import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model' | |
3 | import { VideoFile } from './file' | |
4 | import { VideoConstant } from './video-constant.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 | ||
24 | // Deprecated in 5.0 in favour of truncatedDescription | |
25 | description: string | |
26 | truncatedDescription: string | |
27 | ||
28 | duration: number | |
29 | isLocal: boolean | |
30 | name: string | |
31 | ||
32 | isLive: boolean | |
33 | ||
34 | thumbnailPath: string | |
35 | thumbnailUrl?: string | |
36 | ||
37 | previewPath: string | |
38 | previewUrl?: string | |
39 | ||
40 | embedPath: string | |
41 | embedUrl?: string | |
42 | ||
43 | url: string | |
44 | ||
45 | views: number | |
46 | viewers: number | |
47 | ||
48 | likes: number | |
49 | dislikes: number | |
50 | nsfw: boolean | |
51 | ||
52 | account: AccountSummary | |
53 | channel: VideoChannelSummary | |
54 | ||
55 | userHistory?: { | |
56 | currentTime: number | |
57 | } | |
58 | ||
59 | pluginData?: any | |
60 | ||
61 | // Additional attributes dependending on the query | |
62 | waitTranscoding?: boolean | |
63 | state?: VideoConstant<VideoState> | |
64 | scheduledUpdate?: VideoScheduleUpdate | |
65 | ||
66 | blacklisted?: boolean | |
67 | blacklistedReason?: string | |
68 | ||
69 | blockedOwner?: boolean | |
70 | blockedServer?: boolean | |
71 | ||
72 | files?: VideoFile[] | |
73 | streamingPlaylists?: VideoStreamingPlaylist[] | |
74 | } | |
75 | ||
76 | export interface VideoDetails extends Video { | |
77 | // Deprecated in 5.0 | |
78 | descriptionPath: string | |
79 | ||
80 | support: string | |
81 | channel: VideoChannel | |
82 | account: Account | |
83 | tags: string[] | |
84 | commentsEnabled: boolean | |
85 | downloadEnabled: boolean | |
86 | ||
87 | // Not optional in details (unlike in parent Video) | |
88 | waitTranscoding: boolean | |
89 | state: VideoConstant<VideoState> | |
90 | ||
91 | trackerUrls: string[] | |
92 | ||
93 | files: VideoFile[] | |
94 | streamingPlaylists: VideoStreamingPlaylist[] | |
95 | } |