]>
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 | 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 | viewers: number | |
43 | ||
44 | likes: number | |
45 | dislikes: number | |
46 | nsfw: boolean | |
47 | ||
48 | account: AccountSummary | |
49 | channel: VideoChannelSummary | |
50 | ||
51 | userHistory?: { | |
52 | currentTime: number | |
53 | } | |
54 | ||
55 | pluginData?: any | |
56 | ||
57 | // Additional attributes dependending on the query | |
58 | waitTranscoding?: boolean | |
59 | state?: VideoConstant<VideoState> | |
60 | scheduledUpdate?: VideoScheduleUpdate | |
61 | ||
62 | blacklisted?: boolean | |
63 | blacklistedReason?: string | |
64 | ||
65 | blockedOwner?: boolean | |
66 | blockedServer?: boolean | |
67 | ||
68 | files?: VideoFile[] | |
69 | streamingPlaylists?: VideoStreamingPlaylist[] | |
70 | } | |
71 | ||
72 | export interface VideoDetails extends Video { | |
73 | descriptionPath: string | |
74 | support: string | |
75 | channel: VideoChannel | |
76 | account: Account | |
77 | tags: string[] | |
78 | commentsEnabled: boolean | |
79 | downloadEnabled: boolean | |
80 | ||
81 | // Not optional in details (unlike in parent Video) | |
82 | waitTranscoding: boolean | |
83 | state: VideoConstant<VideoState> | |
84 | ||
85 | trackerUrls: string[] | |
86 | ||
87 | files: VideoFile[] | |
88 | streamingPlaylists: VideoStreamingPlaylist[] | |
89 | } |