aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/typings/models/video/video-streaming-playlist.ts
blob: f1b3438b65ea7fc7a4a8c4d2b9e0c42886395569 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
import { VideoStreamingPlaylistModel } from '../../../models/video/video-streaming-playlist'
import { PickWith } from '../../utils'
import { MVideoRedundancyFileUrl } from './video-redundancy'
import { MVideo } from '@server/typings/models'

type Use<K extends keyof VideoStreamingPlaylistModel, M> = PickWith<VideoStreamingPlaylistModel, K, M>

// ############################################################################

export type MStreamingPlaylist = Omit<VideoStreamingPlaylistModel, 'Video' | 'RedundancyVideos'>

export type MStreamingPlaylistVideo = MStreamingPlaylist &
  Use<'Video', MVideo>

export type MStreamingPlaylistRedundancies = MStreamingPlaylist &
  Use<'RedundancyVideos', MVideoRedundancyFileUrl[]>