diff options
author | Chocobozzz <me@florianbigard.com> | 2019-11-15 15:06:03 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2019-11-25 10:59:43 +0100 |
commit | d7a25329f9e607894d29ab342b9cb66638b56dc0 (patch) | |
tree | 6cd6bc4f2689f78944238b313c93427423a932ac /server/lib/videos.ts | |
parent | 14981d7331da3f63fe6cfaf020ccb7c910006eaf (diff) | |
download | PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.gz PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.tar.zst PeerTube-d7a25329f9e607894d29ab342b9cb66638b56dc0.zip |
Add ability to disable webtorrent
In favour of HLS
Diffstat (limited to 'server/lib/videos.ts')
-rw-r--r-- | server/lib/videos.ts | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/server/lib/videos.ts b/server/lib/videos.ts new file mode 100644 index 000000000..22e9afbf9 --- /dev/null +++ b/server/lib/videos.ts | |||
@@ -0,0 +1,11 @@ | |||
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 | } | ||