From 8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Wed, 16 Jun 2021 15:14:41 +0200 Subject: Refactor live manager --- shared/extra-utils/videos/live.ts | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'shared') diff --git a/shared/extra-utils/videos/live.ts b/shared/extra-utils/videos/live.ts index d3cd974de..c0384769b 100644 --- a/shared/extra-utils/videos/live.ts +++ b/shared/extra-utils/videos/live.ts @@ -175,6 +175,12 @@ async function waitUntilLiveSaved (url: string, token: string, videoId: number | } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) } +async function waitUntilLivePublishedOnAllServers (servers: ServerInfo[], videoId: string) { + for (const server of servers) { + await waitUntilLivePublished(server.url, server.accessToken, videoId) + } +} + async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { const basePath = buildServerDirectory(server, 'streaming-playlists') const hlsPath = join(basePath, 'hls', videoUUID) @@ -226,6 +232,7 @@ export { sendRTMPStreamInVideo, waitUntilLiveEnded, waitFfmpegUntilError, + waitUntilLivePublishedOnAllServers, sendRTMPStream, testFfmpegStreamError } -- cgit v1.2.3