]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/live-command.ts
chore(refactor): remove shared folder dependencies to the server
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / live-command.ts
index bf9486a057acf004418e93efce874f74cf6518fd..74f5d30899ceadc53a2c1d8ee6a2338fb5ddeeda 100644 (file)
@@ -68,11 +68,12 @@ export class LiveCommand extends AbstractCommand {
   async sendRTMPStreamInVideo (options: OverrideCommandOptions & {
     videoId: number | string
     fixtureName?: string
+    copyCodecs?: boolean
   }) {
-    const { videoId, fixtureName } = options
+    const { videoId, fixtureName, copyCodecs } = options
     const videoLive = await this.get({ videoId })
 
-    return sendRTMPStream(videoLive.rtmpUrl, videoLive.streamKey, fixtureName)
+    return sendRTMPStream({ rtmpBaseUrl: videoLive.rtmpUrl, streamKey: videoLive.streamKey, fixtureName, copyCodecs })
   }
 
   async runAndTestStreamError (options: OverrideCommandOptions & {
@@ -125,7 +126,7 @@ export class LiveCommand extends AbstractCommand {
       video = await this.server.videos.getWithToken({ token: options.token, id: options.videoId })
 
       await wait(500)
-    } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED)
+    } while (video.isLive === true || video.state.id !== VideoState.PUBLISHED)
   }
 
   async countPlaylists (options: OverrideCommandOptions & {