diff options
Diffstat (limited to 'shared/utils/videos/video-playlists.ts')
-rw-r--r-- | shared/utils/videos/video-playlists.ts | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/shared/utils/videos/video-playlists.ts b/shared/utils/videos/video-playlists.ts new file mode 100644 index 000000000..9a0710ca6 --- /dev/null +++ b/shared/utils/videos/video-playlists.ts | |||
@@ -0,0 +1,21 @@ | |||
1 | import { makeRawRequest } from '../requests/requests' | ||
2 | |||
3 | function getPlaylist (url: string, statusCodeExpected = 200) { | ||
4 | return makeRawRequest(url, statusCodeExpected) | ||
5 | } | ||
6 | |||
7 | function getSegment (url: string, statusCodeExpected = 200) { | ||
8 | return makeRawRequest(url, statusCodeExpected) | ||
9 | } | ||
10 | |||
11 | function getSegmentSha256 (url: string, statusCodeExpected = 200) { | ||
12 | return makeRawRequest(url, statusCodeExpected) | ||
13 | } | ||
14 | |||
15 | // --------------------------------------------------------------------------- | ||
16 | |||
17 | export { | ||
18 | getPlaylist, | ||
19 | getSegment, | ||
20 | getSegmentSha256 | ||
21 | } | ||