1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 10:19:35 +02:00

Support reinjecting token in private m3u8 playlist

This commit is contained in:
Chocobozzz 2022-12-02 14:47:21 +01:00
parent 04509c4325
commit 71e3e879c0
No known key found for this signature in database
GPG key ID: 583A612D890159BE
22 changed files with 391 additions and 48 deletions

View file

@ -7,16 +7,24 @@ export class StreamingPlaylistsCommand extends AbstractCommand {
async get (options: OverrideCommandOptions & {
url: string
videoFileToken?: string
reinjectVideoFileToken?: boolean
withRetry?: boolean // default false
currentRetry?: number
}) {
const { withRetry, currentRetry = 1 } = options
const { videoFileToken, reinjectVideoFileToken, withRetry, currentRetry = 1 } = options
try {
const result = await unwrapTextOrDecode(this.getRawRequest({
...options,
url: options.url,
query: {
videoFileToken,
reinjectVideoFileToken
},
implicitToken: false,
defaultExpectedStatus: HttpStatusCode.OK_200
}))