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