]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/server-commands/videos/streaming-playlists-command.ts
Support reinjecting token in private m3u8 playlist
[github/Chocobozzz/PeerTube.git] / shared / server-commands / videos / streaming-playlists-command.ts
index 25e446e729b2c55c3a65c0d5536114286454d6de..26ab2735fd33338ef19733e5c8bf6493506f35c9 100644 (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
       }))