mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Refactor live manager
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user