]> 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 266baaed3d863e9b97c006a6454894ee70a42409..34613496963b5a974c165a86993169c890abbf66 100644 (file)
@@ -137,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
 
@@ -185,6 +189,7 @@ export {
   checkLiveCleanup,
   stopFfmpeg,
   sendRTMPStreamInVideo,
+  waitUntilLiveEnded,
   waitFfmpegUntilError,
   sendRTMPStream,
   testFfmpegStreamError