]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blob - shared/models/videos/video.model.ts
Provide origin URL to client and fix remote share
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
1 import { Account, AccountSummary } from '../actors'
2 import { VideoChannel, VideoChannelSummary } from './channel/video-channel.model'
3 import { VideoConstant } from './video-constant.model'
4 import { VideoFile } from './video-file.model'
5 import { VideoPrivacy } from './video-privacy.enum'
6 import { VideoScheduleUpdate } from './video-schedule-update.model'
7 import { VideoState } from './video-state.enum'
8 import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
9
10 export interface Video {
11 id: number
12 uuid: string
13 shortUUID: string
14
15 createdAt: Date | string
16 updatedAt: Date | string
17 publishedAt: Date | string
18 originallyPublishedAt: Date | string
19 category: VideoConstant<number>
20 licence: VideoConstant<number>
21 language: VideoConstant<string>
22 privacy: VideoConstant<VideoPrivacy>
23 description: string
24 duration: number
25 isLocal: boolean
26 name: string
27
28 isLive: boolean
29
30 thumbnailPath: string
31 thumbnailUrl?: string
32
33 previewPath: string
34 previewUrl?: string
35
36 embedPath: string
37 embedUrl?: string
38
39 url: string
40
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 blacklisted?: boolean
51 blacklistedReason?: string
52
53 account: AccountSummary
54 channel: VideoChannelSummary
55
56 userHistory?: {
57 currentTime: number
58 }
59
60 pluginData?: any
61 }
62
63 export interface VideoDetails extends Video {
64 descriptionPath: string
65 support: string
66 channel: VideoChannel
67 account: Account
68 tags: string[]
69 files: VideoFile[]
70 commentsEnabled: boolean
71 downloadEnabled: boolean
72
73 // Not optional in details (unlike in Video)
74 waitTranscoding: boolean
75 state: VideoConstant<VideoState>
76
77 trackerUrls: string[]
78
79 streamingPlaylists: VideoStreamingPlaylist[]
80 }