]>
Commit | Line | Data |
---|---|---|
2186386c | 1 | import { VideoResolution, VideoState } from '../../index' |
50d6de9c | 2 | import { Account } from '../actors' |
b64c950a | 3 | import { Avatar } from '../avatars/avatar.model' |
59c76ffa | 4 | import { VideoChannel } from './channel/video-channel.model' |
fd45e8f4 | 5 | import { VideoPrivacy } from './video-privacy.enum' |
bbe0f064 | 6 | import { VideoScheduleUpdate } from './video-schedule-update.model' |
40e87e9e | 7 | import { VideoConstant } from './video-constant.model' |
ae5a3dd6 | 8 | |
93e1258c C |
9 | export interface VideoFile { |
10 | magnetUri: string | |
09700934 | 11 | resolution: VideoConstant<VideoResolution> |
93e1258c | 12 | size: number // Bytes |
a96aed15 | 13 | torrentUrl: string |
02756fbd | 14 | torrentDownloadUrl: string |
a96aed15 | 15 | fileUrl: string |
02756fbd | 16 | fileDownloadUrl: string |
3a6f351b | 17 | fps: number |
93e1258c C |
18 | } |
19 | ||
2d3741d6 C |
20 | export interface VideoChannelAttribute { |
21 | id: number | |
22 | uuid: string | |
23 | name: string | |
24 | displayName: string | |
25 | url: string | |
26 | host: string | |
27 | avatar: Avatar | |
28 | } | |
29 | ||
30 | export interface AccountAttribute { | |
31 | id: number | |
32 | uuid: string | |
33 | name: string | |
34 | displayName: string | |
35 | url: string | |
36 | host: string | |
37 | avatar: Avatar | |
38 | } | |
39 | ||
69818c93 | 40 | export interface Video { |
0a6658fd C |
41 | id: number |
42 | uuid: string | |
d592e0a9 C |
43 | createdAt: Date | string |
44 | updatedAt: Date | string | |
2922e048 | 45 | publishedAt: Date | string |
ae5a3dd6 C |
46 | category: VideoConstant<number> |
47 | licence: VideoConstant<number> | |
9d3ef9fe | 48 | language: VideoConstant<string> |
2243730c | 49 | privacy: VideoConstant<VideoPrivacy> |
69f616ab C |
50 | description: string |
51 | duration: number | |
52 | isLocal: boolean | |
69f616ab | 53 | name: string |
69f616ab | 54 | thumbnailPath: string |
f981dae8 | 55 | previewPath: string |
d8755eed | 56 | embedPath: string |
69f616ab C |
57 | views: number |
58 | likes: number | |
59 | dislikes: number | |
60 | nsfw: boolean | |
b64c950a | 61 | |
2186386c C |
62 | waitTranscoding?: boolean |
63 | state?: VideoConstant<VideoState> | |
bbe0f064 | 64 | scheduledUpdate?: VideoScheduleUpdate |
2186386c | 65 | |
26b7305a C |
66 | blacklisted?: boolean |
67 | blacklistedReason?: string | |
68 | ||
2d3741d6 C |
69 | account: AccountAttribute |
70 | channel: VideoChannelAttribute | |
6e46de09 C |
71 | |
72 | userHistory?: { | |
73 | currentTime: number | |
74 | } | |
72c7248b C |
75 | } |
76 | ||
77 | export interface VideoDetails extends Video { | |
fd45e8f4 | 78 | descriptionPath: string |
2422c46b | 79 | support: string |
72c7248b | 80 | channel: VideoChannel |
d48ff09d | 81 | tags: string[] |
93e1258c | 82 | files: VideoFile[] |
b1fa3eba | 83 | account: Account |
47564bbe | 84 | commentsEnabled: boolean |
2186386c C |
85 | |
86 | // Not optional in details (unlike in Video) | |
87 | waitTranscoding: boolean | |
88 | state: VideoConstant<VideoState> | |
69818c93 | 89 | } |