} while (video.state.id !== state)
}
+async function waitUntilLiveSaved (url: string, token: string, videoId: number | string) {
+ let video: VideoDetails
+
+ do {
+ const res = await getVideoWithToken(url, token, videoId)
+ video = res.body
+
+ await wait(500)
+ } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED)
+}
+
async function checkLiveCleanup (server: ServerInfo, videoUUID: string, resolutions: number[] = []) {
const basePath = buildServerDirectory(server, 'streaming-playlists')
const hlsPath = join(basePath, 'hls', videoUUID)
export {
getLive,
getPlaylistsCount,
+ waitUntilLiveSaved,
waitUntilLivePublished,
updateLive,
createLive,