]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blame - shared/models/videos/video.model.ts
Merge branch 'master' into develop
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
CommitLineData
418d092a 1import { AccountSummary, VideoChannelSummary, 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
c5a1ae50
C
21export interface PlaylistElement {
22 position: number
23 startTimestamp: number
24 stopTimestamp: number
25}
26
69818c93 27export interface Video {
0a6658fd
C
28 id: number
29 uuid: string
d592e0a9
C
30 createdAt: Date | string
31 updatedAt: Date | string
2922e048 32 publishedAt: Date | string
c8034165 33 originallyPublishedAt: Date | string
ae5a3dd6
C
34 category: VideoConstant<number>
35 licence: VideoConstant<number>
9d3ef9fe 36 language: VideoConstant<string>
2243730c 37 privacy: VideoConstant<VideoPrivacy>
69f616ab
C
38 description: string
39 duration: number
40 isLocal: boolean
69f616ab 41 name: string
69f616ab 42 thumbnailPath: string
f981dae8 43 previewPath: string
d8755eed 44 embedPath: string
69f616ab
C
45 views: number
46 likes: number
47 dislikes: number
48 nsfw: boolean
b64c950a 49
2186386c
C
50 waitTranscoding?: boolean
51 state?: VideoConstant<VideoState>
bbe0f064 52 scheduledUpdate?: VideoScheduleUpdate
2186386c 53
26b7305a
C
54 blacklisted?: boolean
55 blacklistedReason?: string
56
418d092a
C
57 account: AccountSummary
58 channel: VideoChannelSummary
6e46de09
C
59
60 userHistory?: {
61 currentTime: number
62 }
418d092a 63
c5a1ae50 64 playlistElement?: PlaylistElement
72c7248b
C
65}
66
67export interface VideoDetails extends Video {
fd45e8f4 68 descriptionPath: string
2422c46b 69 support: string
72c7248b 70 channel: VideoChannel
d48ff09d 71 tags: string[]
93e1258c 72 files: VideoFile[]
b1fa3eba 73 account: Account
47564bbe 74 commentsEnabled: boolean
7f2cfe3a 75 downloadEnabled: boolean
2186386c
C
76
77 // Not optional in details (unlike in Video)
78 waitTranscoding: boolean
79 state: VideoConstant<VideoState>
09209296
C
80
81 trackerUrls: string[]
82
83 streamingPlaylists: VideoStreamingPlaylist[]
69818c93 84}