]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Correcting documentation to be more precise about CentOS 7
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
2186386c 1import { VideoResolution, VideoState } from '../../index'
50d6de9c 2import { Account } from '../actors'
b64c950a 3import { Avatar } from '../avatars/avatar.model'
72c7248b 4import { VideoChannel } from './video-channel.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
72c7248b 7
ae5a3dd6 8export interface VideoConstant <T> {
9d3ef9fe 9 id: T
ae5a3dd6
C
10 label: string
11}
12
93e1258c
C
13export interface VideoFile {
14 magnetUri: string
09700934 15 resolution: VideoConstant<VideoResolution>
93e1258c 16 size: number // Bytes
a96aed15 17 torrentUrl: string
02756fbd 18 torrentDownloadUrl: string
a96aed15 19 fileUrl: string
02756fbd 20 fileDownloadUrl: string
3a6f351b 21 fps: number
93e1258c
C
22}
23
69818c93 24export interface Video {
0a6658fd
C
25 id: number
26 uuid: string
d592e0a9
C
27 createdAt: Date | string
28 updatedAt: Date | string
2922e048 29 publishedAt: Date | string
ae5a3dd6
C
30 category: VideoConstant<number>
31 licence: VideoConstant<number>
9d3ef9fe 32 language: VideoConstant<string>
2243730c 33 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
34 description: string
35 duration: number
36 isLocal: boolean
69f616ab 37 name: string
69f616ab 38 thumbnailPath: string
f981dae8 39 previewPath: string
d8755eed 40 embedPath: string
69f616ab
C
41 views: number
42 likes: number
43 dislikes: number
44 nsfw: boolean
b64c950a 45
2186386c
C
46 waitTranscoding?: boolean
47 state?: VideoConstant<VideoState>
bbe0f064 48 scheduledUpdate?: VideoScheduleUpdate
2186386c 49
b64c950a 50 account: {
03e12d7c
C
51 id: number
52 uuid: string
b64c950a
C
53 name: string
54 displayName: string
55 url: string
56 host: string
57 avatar: Avatar
58 }
0f320037
C
59
60 channel: {
61 id: number
62 uuid: string
63 name: string
64 displayName: string
65 url: string
66 host: string
67 avatar: Avatar
68 }
72c7248b
C
69}
70
71export interface VideoDetails extends Video {
fd45e8f4 72 descriptionPath: string
2422c46b 73 support: string
72c7248b 74 channel: VideoChannel
d48ff09d 75 tags: string[]
93e1258c 76 files: VideoFile[]
b1fa3eba 77 account: Account
47564bbe 78 commentsEnabled: boolean
2186386c
C
79
80 // Not optional in details (unlike in Video)
81 waitTranscoding: boolean
82 state: VideoConstant<VideoState>
69818c93 83}