]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Fix problem with SMTP in default docker-compose setup
[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'
59c76ffa 4import { VideoChannel } from './channel/video-channel.model'
fd45e8f4 5import { VideoPrivacy } from './video-privacy.enum'
bbe0f064 6import { VideoScheduleUpdate } from './video-schedule-update.model'
40e87e9e 7import { VideoConstant } from './video-constant.model'
09209296 8import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
ae5a3dd6 9
93e1258c
C
10export interface VideoFile {
11 magnetUri: string
09700934 12 resolution: VideoConstant<VideoResolution>
93e1258c 13 size: number // Bytes
a96aed15 14 torrentUrl: string
02756fbd 15 torrentDownloadUrl: string
a96aed15 16 fileUrl: string
02756fbd 17 fileDownloadUrl: string
3a6f351b 18 fps: number
93e1258c
C
19}
20
2d3741d6
C
21export interface VideoChannelAttribute {
22 id: number
23 uuid: string
24 name: string
25 displayName: string
26 url: string
27 host: string
457bb213 28 avatar?: Avatar
2d3741d6
C
29}
30
31export interface AccountAttribute {
32 id: number
33 uuid: string
34 name: string
35 displayName: string
36 url: string
37 host: string
457bb213 38 avatar?: Avatar
2d3741d6
C
39}
40
69818c93 41export interface Video {
0a6658fd
C
42 id: number
43 uuid: string
d592e0a9
C
44 createdAt: Date | string
45 updatedAt: Date | string
2922e048 46 publishedAt: Date | string
c8034165 47 originallyPublishedAt: Date | string
ae5a3dd6
C
48 category: VideoConstant<number>
49 licence: VideoConstant<number>
9d3ef9fe 50 language: VideoConstant<string>
2243730c 51 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
52 description: string
53 duration: number
54 isLocal: boolean
69f616ab 55 name: string
69f616ab 56 thumbnailPath: string
f981dae8 57 previewPath: string
d8755eed 58 embedPath: string
69f616ab
C
59 views: number
60 likes: number
61 dislikes: number
62 nsfw: boolean
b64c950a 63
2186386c
C
64 waitTranscoding?: boolean
65 state?: VideoConstant<VideoState>
bbe0f064 66 scheduledUpdate?: VideoScheduleUpdate
2186386c 67
26b7305a
C
68 blacklisted?: boolean
69 blacklistedReason?: string
70
2d3741d6
C
71 account: AccountAttribute
72 channel: VideoChannelAttribute
6e46de09
C
73
74 userHistory?: {
75 currentTime: number
76 }
72c7248b
C
77}
78
79export interface VideoDetails extends Video {
fd45e8f4 80 descriptionPath: string
2422c46b 81 support: string
72c7248b 82 channel: VideoChannel
d48ff09d 83 tags: string[]
93e1258c 84 files: VideoFile[]
b1fa3eba 85 account: Account
47564bbe 86 commentsEnabled: boolean
7f2cfe3a 87 downloadEnabled: boolean
2186386c
C
88
89 // Not optional in details (unlike in Video)
90 waitTranscoding: boolean
91 state: VideoConstant<VideoState>
09209296
C
92
93 trackerUrls: string[]
94
95 streamingPlaylists: VideoStreamingPlaylist[]
69818c93 96}