]>
Commit | Line | Data |
---|---|---|
d7a25329 C |
1 | import { isStreamingPlaylist, MStreamingPlaylistVideo, MVideo } from '@server/typings/models' |
2 | ||
3 | function extractVideo (videoOrPlaylist: MVideo | MStreamingPlaylistVideo) { | |
4 | return isStreamingPlaylist(videoOrPlaylist) | |
5 | ? videoOrPlaylist.Video | |
6 | : videoOrPlaylist | |
7 | } | |
8 | ||
9 | export { | |
10 | extractVideo | |
11 | } |