Handle higher FPS for high resolution (test)
[oweals/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
8 export interface VideoConstant <T> {
9   id: T
10   label: string
11 }
12
13 export interface VideoFile {
14   magnetUri: string
15   resolution: VideoConstant<VideoResolution>
16   size: number // Bytes
17   torrentUrl: string
18   torrentDownloadUrl: string
19   fileUrl: string
20   fileDownloadUrl: string
21   fps: number
22 }
23
24 export interface Video {
25   id: number
26   uuid: string
27   createdAt: Date | string
28   updatedAt: Date | string
29   publishedAt: Date | string
30   category: VideoConstant<number>
31   licence: VideoConstant<number>
32   language: VideoConstant<string>
33   privacy: VideoConstant<VideoPrivacy>
34   description: string
35   duration: number
36   isLocal: boolean
37   name: string
38   thumbnailPath: string
39   previewPath: string
40   embedPath: string
41   views: number
42   likes: number
43   dislikes: number
44   nsfw: boolean
45
46   waitTranscoding?: boolean
47   state?: VideoConstant<VideoState>
48   scheduledUpdate?: VideoScheduleUpdate
49
50   account: {
51     id: number
52     uuid: string
53     name: string
54     displayName: string
55     url: string
56     host: string
57     avatar: Avatar
58   }
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   }
69 }
70
71 export interface VideoDetails extends Video {
72   descriptionPath: string
73   support: string
74   channel: VideoChannel
75   tags: string[]
76   files: VideoFile[]
77   account: Account
78   commentsEnabled: boolean
79
80   // Not optional in details (unlike in Video)
81   waitTranscoding: boolean
82   state: VideoConstant<VideoState>
83 }