video.model.ts 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. import { AccountSummary, VideoChannelSummary, VideoResolution, VideoState } from '../../index'
  2. import { Account } from '../actors'
  3. import { VideoChannel } from './channel/video-channel.model'
  4. import { VideoPrivacy } from './video-privacy.enum'
  5. import { VideoScheduleUpdate } from './video-schedule-update.model'
  6. import { VideoConstant } from './video-constant.model'
  7. import { VideoStreamingPlaylist } from './video-streaming-playlist.model'
  8. import { VideoFile } from './video-file.model'
  9. export interface Video {
  10. id: number
  11. uuid: string
  12. createdAt: Date | string
  13. updatedAt: Date | string
  14. publishedAt: Date | string
  15. originallyPublishedAt: Date | string
  16. category: VideoConstant<number>
  17. licence: VideoConstant<number>
  18. language: VideoConstant<string>
  19. privacy: VideoConstant<VideoPrivacy>
  20. description: string
  21. duration: number
  22. isLocal: boolean
  23. name: string
  24. thumbnailPath: string
  25. previewPath: string
  26. embedPath: string
  27. views: number
  28. likes: number
  29. dislikes: number
  30. nsfw: boolean
  31. waitTranscoding?: boolean
  32. state?: VideoConstant<VideoState>
  33. scheduledUpdate?: VideoScheduleUpdate
  34. blacklisted?: boolean
  35. blacklistedReason?: string
  36. account: AccountSummary
  37. channel: VideoChannelSummary
  38. userHistory?: {
  39. currentTime: number
  40. }
  41. }
  42. export interface VideoDetails extends Video {
  43. descriptionPath: string
  44. support: string
  45. channel: VideoChannel
  46. account: Account
  47. tags: string[]
  48. files: VideoFile[]
  49. commentsEnabled: boolean
  50. downloadEnabled: boolean
  51. // Not optional in details (unlike in Video)
  52. waitTranscoding: boolean
  53. state: VideoConstant<VideoState>
  54. trackerUrls: string[]
  55. streamingPlaylists: VideoStreamingPlaylist[]
  56. }