]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
First implem global search
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
1 import { AccountSummary, VideoChannelSummary, 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 import { VideoFile } from './video-file.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 thumbnailPath: string
27 thumbnailUrl?: string
28
29 previewPath: string
30 previewUrl?: string
31
32 embedPath: string
33 embedUrl?: string
34
35 // When using the search index
36 url?: string
37
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 }