]>
Commit | Line | Data |
---|---|---|
1 | import { AccountSummary, VideoChannelSummary, VideoResolution, VideoState } from '../../index' | |
2 | import { Account } from '../actors' | |
3 | import { VideoChannel } from './channel/video-channel.model' | |
4 | import { VideoPrivacy } from './video-privacy.enum' | |
5 | import { VideoScheduleUpdate } from './video-schedule-update.model' | |
6 | import { VideoConstant } from './video-constant.model' | |
7 | import { VideoStreamingPlaylist } from './video-streaming-playlist.model' | |
8 | ||
9 | export interface VideoFile { | |
10 | magnetUri: string | |
11 | resolution: VideoConstant<VideoResolution> | |
12 | size: number // Bytes | |
13 | torrentUrl: string | |
14 | torrentDownloadUrl: string | |
15 | fileUrl: string | |
16 | fileDownloadUrl: string | |
17 | fps: number | |
18 | } | |
19 | ||
20 | export interface Video { | |
21 | id: number | |
22 | uuid: string | |
23 | createdAt: Date | string | |
24 | updatedAt: Date | string | |
25 | publishedAt: Date | string | |
26 | originallyPublishedAt: Date | string | |
27 | category: VideoConstant<number> | |
28 | licence: VideoConstant<number> | |
29 | language: VideoConstant<string> | |
30 | privacy: VideoConstant<VideoPrivacy> | |
31 | description: string | |
32 | duration: number | |
33 | isLocal: boolean | |
34 | name: string | |
35 | thumbnailPath: string | |
36 | previewPath: string | |
37 | embedPath: string | |
38 | views: number | |
39 | likes: number | |
40 | dislikes: number | |
41 | nsfw: boolean | |
42 | ||
43 | waitTranscoding?: boolean | |
44 | state?: VideoConstant<VideoState> | |
45 | scheduledUpdate?: VideoScheduleUpdate | |
46 | ||
47 | blacklisted?: boolean | |
48 | blacklistedReason?: string | |
49 | ||
50 | account: AccountSummary | |
51 | channel: VideoChannelSummary | |
52 | ||
53 | userHistory?: { | |
54 | currentTime: number | |
55 | } | |
56 | } | |
57 | ||
58 | export interface VideoDetails extends Video { | |
59 | descriptionPath: string | |
60 | support: string | |
61 | channel: VideoChannel | |
62 | account: Account | |
63 | tags: string[] | |
64 | files: VideoFile[] | |
65 | commentsEnabled: boolean | |
66 | downloadEnabled: boolean | |
67 | ||
68 | // Not optional in details (unlike in Video) | |
69 | waitTranscoding: boolean | |
70 | state: VideoConstant<VideoState> | |
71 | ||
72 | trackerUrls: string[] | |
73 | ||
74 | streamingPlaylists: VideoStreamingPlaylist[] | |
75 | } |