X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fmodels%2Fvideos%2Fvideo.model.ts;h=df800461c0b7095e4a58ca8d4a510c4926ffb57c;hb=b427febb4d5cebf03b815bca2c59af6e82491569;hp=8e1fbe444269eb7cb78f2f302ad2488475da4b60;hpb=59c76ffa8f503e962d517c78f033f1beccb1de1a;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/models/videos/video.model.ts b/shared/models/videos/video.model.ts index 8e1fbe444..df800461c 100644 --- a/shared/models/videos/video.model.ts +++ b/shared/models/videos/video.model.ts @@ -5,6 +5,7 @@ import { VideoChannel } from './channel/video-channel.model' import { VideoPrivacy } from './video-privacy.enum' import { VideoScheduleUpdate } from './video-schedule-update.model' import { VideoConstant } from './video-constant.model' +import { VideoStreamingPlaylist } from './video-streaming-playlist.model' export interface VideoFile { magnetUri: string @@ -17,12 +18,33 @@ 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 createdAt: Date | string updatedAt: Date | string publishedAt: Date | string + originallyPublishedAt: Date | string category: VideoConstant licence: VideoConstant language: VideoConstant @@ -46,24 +68,11 @@ export interface Video { blacklisted?: boolean blacklistedReason?: string - account: { - id: number - uuid: string - name: string - displayName: string - url: string - host: string - avatar: Avatar - } + account: AccountAttribute + channel: VideoChannelAttribute - channel: { - id: number - uuid: string - name: string - displayName: string - url: string - host: string - avatar: Avatar + userHistory?: { + currentTime: number } } @@ -75,8 +84,13 @@ export interface VideoDetails extends Video { files: VideoFile[] account: Account commentsEnabled: boolean + downloadEnabled: boolean // Not optional in details (unlike in Video) waitTranscoding: boolean state: VideoConstant + + trackerUrls: string[] + + streamingPlaylists: VideoStreamingPlaylist[] }