diff options
author | Chocobozzz <me@florianbigard.com> | 2022-12-02 14:47:21 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2022-12-02 15:25:20 +0100 |
commit | 71e3e879c0616882ee82a0e44f8c2e5ee9698a3e (patch) | |
tree | 14452d26d240eb6d44178b76fc2dabda4cfc9428 /shared/server-commands | |
parent | 04509c43254dc232c61681ac4bb98e09fd126115 (diff) | |
download | PeerTube-71e3e879c0616882ee82a0e44f8c2e5ee9698a3e.tar.gz PeerTube-71e3e879c0616882ee82a0e44f8c2e5ee9698a3e.tar.zst PeerTube-71e3e879c0616882ee82a0e44f8c2e5ee9698a3e.zip |
Support reinjecting token in private m3u8 playlist
Diffstat (limited to 'shared/server-commands')
-rw-r--r-- | shared/server-commands/videos/streaming-playlists-command.ts | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/shared/server-commands/videos/streaming-playlists-command.ts b/shared/server-commands/videos/streaming-playlists-command.ts index 25e446e72..26ab2735f 100644 --- a/shared/server-commands/videos/streaming-playlists-command.ts +++ b/shared/server-commands/videos/streaming-playlists-command.ts | |||
@@ -7,16 +7,24 @@ export class StreamingPlaylistsCommand extends AbstractCommand { | |||
7 | 7 | ||
8 | async get (options: OverrideCommandOptions & { | 8 | async get (options: OverrideCommandOptions & { |
9 | url: string | 9 | url: string |
10 | |||
11 | videoFileToken?: string | ||
12 | reinjectVideoFileToken?: boolean | ||
13 | |||
10 | withRetry?: boolean // default false | 14 | withRetry?: boolean // default false |
11 | currentRetry?: number | 15 | currentRetry?: number |
12 | }) { | 16 | }) { |
13 | const { withRetry, currentRetry = 1 } = options | 17 | const { videoFileToken, reinjectVideoFileToken, withRetry, currentRetry = 1 } = options |
14 | 18 | ||
15 | try { | 19 | try { |
16 | const result = await unwrapTextOrDecode(this.getRawRequest({ | 20 | const result = await unwrapTextOrDecode(this.getRawRequest({ |
17 | ...options, | 21 | ...options, |
18 | 22 | ||
19 | url: options.url, | 23 | url: options.url, |
24 | query: { | ||
25 | videoFileToken, | ||
26 | reinjectVideoFileToken | ||
27 | }, | ||
20 | implicitToken: false, | 28 | implicitToken: false, |
21 | defaultExpectedStatus: HttpStatusCode.OK_200 | 29 | defaultExpectedStatus: HttpStatusCode.OK_200 |
22 | })) | 30 | })) |