]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Add hls support on server
[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
ae5a3dd6
C
47 category: VideoConstant<number>
48 licence: VideoConstant<number>
9d3ef9fe 49 language: VideoConstant<string>
2243730c 50 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
51 description: string
52 duration: number
53 isLocal: boolean
69f616ab 54 name: string
69f616ab 55 thumbnailPath: string
f981dae8 56 previewPath: string
d8755eed 57 embedPath: string
69f616ab
C
58 views: number
59 likes: number
60 dislikes: number
61 nsfw: boolean
b64c950a 62
2186386c
C
63 waitTranscoding?: boolean
64 state?: VideoConstant<VideoState>
bbe0f064 65 scheduledUpdate?: VideoScheduleUpdate
2186386c 66
26b7305a
C
67 blacklisted?: boolean
68 blacklistedReason?: string
69
2d3741d6
C
70 account: AccountAttribute
71 channel: VideoChannelAttribute
6e46de09
C
72
73 userHistory?: {
74 currentTime: number
75 }
72c7248b
C
76}
77
78export interface VideoDetails extends Video {
fd45e8f4 79 descriptionPath: string
2422c46b 80 support: string
72c7248b 81 channel: VideoChannel
d48ff09d 82 tags: string[]
93e1258c 83 files: VideoFile[]
b1fa3eba 84 account: Account
47564bbe 85 commentsEnabled: boolean
2186386c
C
86
87 // Not optional in details (unlike in Video)
88 waitTranscoding: boolean
89 state: VideoConstant<VideoState>
09209296
C
90
91 trackerUrls: string[]
92
93 streamingPlaylists: VideoStreamingPlaylist[]
69818c93 94}