aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2021-06-16 15:14:41 +0200
committerChocobozzz <me@florianbigard.com>2021-06-17 08:47:03 +0200
commit8ebf2a5d5d126e6ef9b89109124adf2a5e9e293d (patch)
treeeee3ef972943be629519c2dc97928878dbd2d732 /shared/extra-utils/videos
parentfd6584844b070cfc283902aba26f2853473e83d1 (diff)
downloadPeerTube-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.ts7
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
178async function waitUntilLivePublishedOnAllServers (servers: ServerInfo[], videoId: string) {
179 for (const server of servers) {
180 await waitUntilLivePublished(server.url, server.accessToken, videoId)
181 }
182}
183
178async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) { 184async 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}