3a378419f236a3779730107a365cd48fa35987d6
[oweals/peertube.git] / shared / models / videos / video.model.ts
1 import { Account } from '../accounts'
2 import { VideoChannel } from './video-channel.model'
3 import { VideoPrivacy } from './video-privacy.enum'
4
5 export interface VideoFile {
6   magnetUri: string
7   resolution: number
8   resolutionLabel: string
9   size: number // Bytes
10   torrentUrl: string
11   fileUrl: string
12 }
13
14 export interface Video {
15   id: number
16   uuid: string
17   accountName: string
18   createdAt: Date | string
19   updatedAt: Date | string
20   categoryLabel: string
21   category: number
22   licenceLabel: string
23   licence: number
24   languageLabel: string
25   language: number
26   description: string
27   duration: number
28   isLocal: boolean
29   name: string
30   serverHost: string
31   thumbnailPath: string
32   previewPath: string
33   embedPath: string
34   views: number
35   likes: number
36   dislikes: number
37   nsfw: boolean
38 }
39
40 export interface VideoDetails extends Video {
41   privacy: VideoPrivacy
42   privacyLabel: string
43   descriptionPath: string
44   channel: VideoChannel
45   tags: string[]
46   files: VideoFile[]
47   account: Account
48 }