1
0
Fork 0
peertube/server/lib/videos.ts
Chocobozzz d7a25329f9
Add ability to disable webtorrent
In favour of HLS
2019-11-25 10:59:43 +01:00

11 lines
296 B
TypeScript

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