1
0
Fork 0
peertube/server/lib/videos.ts

12 lines
296 B
TypeScript
Raw Normal View History

import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo } from '@server/typings/models'
function extractVideo (videoOrPlaylist: MVideo | MStreamingPlaylistVideo) {
return isStreamingPlaylist(videoOrPlaylist)
? videoOrPlaylist.Video
: videoOrPlaylist
}
export {
extractVideo
}