]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
f7bbaac76bd13d7b0e6fcddde2e0eadea5b05dcb
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
1 import { VideoResolution, VideoState } from '../../index'
2 import { Account } from '../actors'
3 import { Avatar } from '../avatars/avatar.model'
4 import { VideoChannel } from './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
9 export interface VideoFile {
10 magnetUri: string
11 resolution: VideoConstant<VideoResolution>
12 size: number // Bytes
13 torrentUrl: string
14 torrentDownloadUrl: string
15 fileUrl: string
16 fileDownloadUrl: string
17 fps: number
18 }
19
20 export interface Video {
21 id: number
22 uuid: string
23 createdAt: Date | string
24 updatedAt: Date | string
25 publishedAt: Date | string
26 category: VideoConstant<number>
27 licence: VideoConstant<number>
28 language: VideoConstant<string>
29 privacy: VideoConstant<VideoPrivacy>
30 description: string
31 duration: number
32 isLocal: boolean
33 name: string
34 thumbnailPath: string
35 previewPath: string
36 embedPath: string
37 views: number
38 likes: number
39 dislikes: number
40 nsfw: boolean
41
42 waitTranscoding?: boolean
43 state?: VideoConstant<VideoState>
44 scheduledUpdate?: VideoScheduleUpdate
45
46 account: {
47 id: number
48 uuid: string
49 name: string
50 displayName: string
51 url: string
52 host: string
53 avatar: Avatar
54 }
55
56 channel: {
57 id: number
58 uuid: string
59 name: string
60 displayName: string
61 url: string
62 host: string
63 avatar: Avatar
64 }
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
76 // Not optional in details (unlike in Video)
77 waitTranscoding: boolean
78 state: VideoConstant<VideoState>
79 }