diff options
author | Chocobozzz <me@florianbigard.com> | 2021-06-16 15:14:41 +0200 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2021-06-17 08:47:03 +0200 |
commit | 8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d (patch) | |
tree | eee3ef972943be629519c2dc97928878dbd2d732 /shared/extra-utils/videos | |
parent | fd6584844b070cfc283902aba26f2853473e83d1 (diff) | |
download | PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.tar.gz PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.tar.zst PeerTube-8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d.zip |
Refactor live manager
Diffstat (limited to 'shared/extra-utils/videos')
-rw-r--r-- | shared/extra-utils/videos/live.ts | 7 |
1 files changed, 7 insertions, 0 deletions
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 | | |||
175 | } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) | 175 | } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) |
176 | } | 176 | } |
177 | 177 | ||
178 | async function waitUntilLivePublishedOnAllServers (servers: ServerInfo[], videoId: string) { | ||
179 | for (const server of servers) { | ||
180 | await waitUntilLivePublished(server.url, server.accessToken, videoId) | ||
181 | } | ||
182 | } | ||
183 | |||
178 | async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { | 184 | async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { |
179 | const basePath = buildServerDirectory(server, 'streaming-playlists') | 185 | const basePath = buildServerDirectory(server, 'streaming-playlists') |
180 | const hlsPath = join(basePath, 'hls', videoUUID) | 186 | const hlsPath = join(basePath, 'hls', videoUUID) |
@@ -226,6 +232,7 @@ export { | |||
226 | sendRTMPStreamInVideo, | 232 | sendRTMPStreamInVideo, |
227 | waitUntilLiveEnded, | 233 | waitUntilLiveEnded, |
228 | waitFfmpegUntilError, | 234 | waitFfmpegUntilError, |
235 | waitUntilLivePublishedOnAllServers, | ||
229 | sendRTMPStream, | 236 | sendRTMPStream, |
230 | testFfmpegStreamError | 237 | testFfmpegStreamError |
231 | } | 238 | } |