1
0
Fork 0
peertube/shared/models/videos/video.model.ts

60 lines
1.2 KiB
TypeScript
Raw Normal View History

import { VideoResolution } from '../../index'
2017-12-14 11:38:41 -05:00
import { Account } from '../actors'
2018-03-12 06:06:15 -04:00
import { Avatar } from '../avatars/avatar.model'
2017-10-24 13:41:09 -04:00
import { VideoChannel } from './video-channel.model'
2017-10-31 06:52:52 -04:00
import { VideoPrivacy } from './video-privacy.enum'
2017-10-24 13:41:09 -04:00
2018-03-19 05:24:12 -04:00
export interface VideoConstant <T> {
2018-04-23 08:39:52 -04:00
id: T
2018-03-19 05:24:12 -04:00
label: string
}
export interface VideoFile {
magnetUri: string
resolution: VideoConstant<VideoResolution>
size: number // Bytes
torrentUrl: string
fileUrl: string
}
2017-06-10 16:15:25 -04:00
export interface Video {
id: number
uuid: string
createdAt: Date | string
updatedAt: Date | string
publishedAt: Date | string
2018-03-19 05:24:12 -04:00
category: VideoConstant<number>
licence: VideoConstant<number>
2018-04-23 08:39:52 -04:00
language: VideoConstant<string>
privacy: VideoConstant<VideoPrivacy>
2017-06-11 05:02:35 -04:00
description: string
duration: number
isLocal: boolean
name: string
thumbnailPath: string
2017-07-12 05:56:02 -04:00
previewPath: string
2017-10-16 04:05:49 -04:00
embedPath: string
2017-06-11 05:02:35 -04:00
views: number
likes: number
dislikes: number
nsfw: boolean
2018-03-12 06:06:15 -04:00
account: {
name: string
displayName: string
url: string
host: string
avatar: Avatar
}
2017-10-24 13:41:09 -04:00
}
export interface VideoDetails extends Video {
2017-10-31 06:52:52 -04:00
descriptionPath: string
support: string
2017-10-24 13:41:09 -04:00
channel: VideoChannel
2017-12-14 04:07:57 -05:00
tags: string[]
files: VideoFile[]
2017-12-06 11:15:59 -05:00
account: Account
2018-01-03 04:12:36 -05:00
commentsEnabled: boolean
2017-06-10 16:15:25 -04:00
}