aboutsummaryrefslogtreecommitdiffhomepage
path: root/shared/extra-utils/videos/live-command.ts
diff options
context:
space:
mode:
Diffstat (limited to 'shared/extra-utils/videos/live-command.ts')
-rw-r--r--shared/extra-utils/videos/live-command.ts7
1 files changed, 2 insertions, 5 deletions
diff --git a/shared/extra-utils/videos/live-command.ts b/shared/extra-utils/videos/live-command.ts
index a494e60fa..5adf601cc 100644
--- a/shared/extra-utils/videos/live-command.ts
+++ b/shared/extra-utils/videos/live-command.ts
@@ -9,7 +9,6 @@ import { wait } from '../miscs'
9import { unwrapBody } from '../requests' 9import { unwrapBody } from '../requests'
10import { AbstractCommand, OverrideCommandOptions } from '../shared' 10import { AbstractCommand, OverrideCommandOptions } from '../shared'
11import { sendRTMPStream, testFfmpegStreamError } from './live' 11import { sendRTMPStream, testFfmpegStreamError } from './live'
12import { getVideoWithToken } from './videos'
13 12
14export class LiveCommand extends AbstractCommand { 13export class LiveCommand extends AbstractCommand {
15 14
@@ -124,8 +123,7 @@ export class LiveCommand extends AbstractCommand {
124 let video: VideoDetails 123 let video: VideoDetails
125 124
126 do { 125 do {
127 const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) 126 video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId })
128 video = res.body
129 127
130 await wait(500) 128 await wait(500)
131 } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED) 129 } while (video.isLive === true && video.state.id !== VideoState.PUBLISHED)
@@ -149,8 +147,7 @@ export class LiveCommand extends AbstractCommand {
149 let video: VideoDetails 147 let video: VideoDetails
150 148
151 do { 149 do {
152 const res = await getVideoWithToken(this.server.url, options.token ?? this.server.accessToken, options.videoId) 150 video = await this.server.videosCommand.getWithToken({ token: options.token, id: options.videoId })
153 video = res.body
154 151
155 await wait(500) 152 await wait(500)
156 } while (video.state.id !== options.state) 153 } while (video.state.id !== options.state)