]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Support plugin hooks in embed
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
583eb04b
C
1import { Account, AccountSummary } from '../actors'
2import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
3import { VideoConstant } from './video-constant.model'
4import { VideoFile } from './video-file.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
583eb04b 7import { VideoState } from './video-state.enum'
09209296 8import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
93e1258c 9
69818c93 10export interface Video {
0a6658fd
C
11 id: number
12 uuid: string
d592e0a9
C
13 createdAt: Date | string
14 updatedAt: Date | string
2922e048 15 publishedAt: Date | string
c8034165 16 originallyPublishedAt: Date | string
ae5a3dd6
C
17 category: VideoConstant<number>
18 licence: VideoConstant<number>
9d3ef9fe 19 language: VideoConstant<string>
2243730c 20 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
21 description: string
22 duration: number
23 isLocal: boolean
69f616ab 24 name: string
5fb2e288 25
69f616ab 26 thumbnailPath: string
5fb2e288
C
27 thumbnailUrl?: string
28
f981dae8 29 previewPath: string
5fb2e288
C
30 previewUrl?: string
31
d8755eed 32 embedPath: string
5fb2e288
C
33 embedUrl?: string
34
35 // When using the search index
36 url?: string
37
69f616ab
C
38 views: number
39 likes: number
40 dislikes: number
41 nsfw: boolean
b64c950a 42
2186386c
C
43 waitTranscoding?: boolean
44 state?: VideoConstant<VideoState>
bbe0f064 45 scheduledUpdate?: VideoScheduleUpdate
2186386c 46
26b7305a
C
47 blacklisted?: boolean
48 blacklistedReason?: string
49
418d092a
C
50 account: AccountSummary
51 channel: VideoChannelSummary
6e46de09
C
52
53 userHistory?: {
54 currentTime: number
55 }
72c7248b
C
56}
57
58export interface VideoDetails extends Video {
fd45e8f4 59 descriptionPath: string
2422c46b 60 support: string
72c7248b 61 channel: VideoChannel
5dce26d2 62 account: Account
d48ff09d 63 tags: string[]
93e1258c 64 files: VideoFile[]
47564bbe 65 commentsEnabled: boolean
7f2cfe3a 66 downloadEnabled: boolean
2186386c
C
67
68 // Not optional in details (unlike in Video)
69 waitTranscoding: boolean
70 state: VideoConstant<VideoState>
09209296
C
71
72 trackerUrls: string[]
73
74 streamingPlaylists: VideoStreamingPlaylist[]
69818c93 75}