]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
Merge branch 'release/3.2.0' into develop
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
1 import { Account, AccountSummary } from '../actors'
2 import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
3 import { VideoConstant } from './video-constant.model'
4 import { VideoFile } from './video-file.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 createdAt: Date | string
14 updatedAt: Date | string
15 publishedAt: Date | string
16 originallyPublishedAt: Date | string
17 category: VideoConstant<number>
18 licence: VideoConstant<number>
19 language: VideoConstant<string>
20 privacy: VideoConstant<VideoPrivacy>
21 description: string
22 duration: number
23 isLocal: boolean
24 name: string
25
26 isLive: boolean
27
28 thumbnailPath: string
29 thumbnailUrl?: string
30
31 previewPath: string
32 previewUrl?: string
33
34 embedPath: string
35 embedUrl?: string
36
37 // When using the search index
38 url?: string
39
40 views: number
41 likes: number
42 dislikes: number
43 nsfw: boolean
44
45 waitTranscoding?: boolean
46 state?: VideoConstant<VideoState>
47 scheduledUpdate?: VideoScheduleUpdate
48
49 blacklisted?: boolean
50 blacklistedReason?: string
51
52 account: AccountSummary
53 channel: VideoChannelSummary
54
55 userHistory?: {
56 currentTime: number
57 }
58
59 pluginData?: any
60 }
61
62 export interface VideoDetails extends Video {
63 descriptionPath: string
64 support: string
65 channel: VideoChannel
66 account: Account
67 tags: string[]
68 files: VideoFile[]
69 commentsEnabled: boolean
70 downloadEnabled: boolean
71
72 // Not optional in details (unlike in Video)
73 waitTranscoding: boolean
74 state: VideoConstant<VideoState>
75
76 trackerUrls: string[]
77
78 streamingPlaylists: VideoStreamingPlaylist[]
79 }