]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/models/videos/video.model.ts
Merge branch 'feature/correctly-send-activities' into develop
[github/Chocobozzz/PeerTube.git] / shared / models / videos / video.model.ts
index 4e1f15ee30cc77e923af08f7c06d16aa6ac45167..803db8255253dc0e749a9312e5da1daf15f1ba8c 100644 (file)
@@ -1,14 +1,11 @@
 import { VideoResolution, VideoState } from '../../index'
 import { Account } from '../actors'
 import { Avatar } from '../avatars/avatar.model'
-import { VideoChannel } from './video-channel.model'
+import { VideoChannel } from './channel/video-channel.model'
 import { VideoPrivacy } from './video-privacy.enum'
 import { VideoScheduleUpdate } from './video-schedule-update.model'
-
-export interface VideoConstant <T> {
-  id: T
-  label: string
-}
+import { VideoConstant } from './video-constant.model'
+import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
 
 export interface VideoFile {
   magnetUri: string
@@ -21,6 +18,26 @@ export interface VideoFile {
   fps: number
 }
 
+export interface VideoChannelAttribute {
+  id: number
+  uuid: string
+  name: string
+  displayName: string
+  url: string
+  host: string
+  avatar?: Avatar
+}
+
+export interface AccountAttribute {
+  id: number
+  uuid: string
+  name: string
+  displayName: string
+  url: string
+  host: string
+  avatar?: Avatar
+}
+
 export interface Video {
   id: number
   uuid: string
@@ -47,24 +64,14 @@ export interface Video {
   state?: VideoConstant<VideoState>
   scheduledUpdate?: VideoScheduleUpdate
 
-  account: {
-    id: number
-    uuid: string
-    name: string
-    displayName: string
-    url: string
-    host: string
-    avatar: Avatar
-  }
+  blacklisted?: boolean
+  blacklistedReason?: string
+
+  account: AccountAttribute
+  channel: VideoChannelAttribute
 
-  channel: {
-    id: number
-    uuid: string
-    name: string
-    displayName: string
-    url: string
-    host: string
-    avatar: Avatar
+  userHistory?: {
+    currentTime: number
   }
 }
 
@@ -80,4 +87,8 @@ export interface VideoDetails extends Video {
   // Not optional in details (unlike in Video)
   waitTranscoding: boolean
   state: VideoConstant<VideoState>
+
+  trackerUrls: string[]
+
+  streamingPlaylists: VideoStreamingPlaylist[]
 }