+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)
+}
+