]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - shared/extra-utils/videos/live.ts
Try to fix live test
[github/Chocobozzz/PeerTube.git] / shared / extra-utils / videos / live.ts
index c8acb90daa5b5f453c410c9546a6bc2d22fef7d4..34613496963b5a974c165a86993169c890abbf66 100644 (file)
@@ -69,6 +69,7 @@ function sendRTMPStream (rtmpBaseUrl: string, streamKey: string, fixtureName = '
   command.outputOption('-c:v libx264')
   command.outputOption('-g 50')
   command.outputOption('-keyint_min 2')
+  command.outputOption('-r 60')
   command.outputOption('-f flv')
 
   const rtmpUrl = rtmpBaseUrl + '/' + streamKey
@@ -136,6 +137,10 @@ function waitUntilLivePublished (url: string, token: string, videoId: number | s
   return waitWhileLiveState(url, token, videoId, VideoState.PUBLISHED)
 }
 
+function waitUntilLiveEnded (url: string, token: string, videoId: number | string) {
+  return waitWhileLiveState(url, token, videoId, VideoState.LIVE_ENDED)
+}
+
 async function waitWhileLiveState (url: string, token: string, videoId: number | string, state: VideoState) {
   let video: VideoDetails
 
@@ -184,6 +189,7 @@ export {
   checkLiveCleanup,
   stopFfmpeg,
   sendRTMPStreamInVideo,
+  waitUntilLiveEnded,
   waitFfmpegUntilError,
   sendRTMPStream,
   testFfmpegStreamError