X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=shared%2Fextra-utils%2Fvideos%2Flive.ts;h=34613496963b5a974c165a86993169c890abbf66;hb=0e856b78e9b6aca5e6a48a04af8b747dbc69658f;hp=266baaed3d863e9b97c006a6454894ee70a42409;hpb=7fd03a2c8f9d342927db8fcfa84c96e14a7740a2;p=github%2FChocobozzz%2FPeerTube.git diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts index 266baaed3..346134969 100644 --- a/shared/extra-utils/videos/live.ts +++ b/shared/extra-utils/videos/live.ts @@ -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