delay execute till after stream ready (#143)

This commit is contained in:
Kurt Hutten
2023-06-23 14:19:15 +10:00
committed by GitHub
parent fb3c34d5f3
commit 3510abfcb9
6 changed files with 43 additions and 27 deletions

View File

@ -6,7 +6,10 @@ export async function executor(
ast: Program,
pm: ProgramMemory = { root: {}, pendingMemory: {} }
): Promise<ProgramMemory> {
const engineCommandManager = new EngineCommandManager(() => {})
const engineCommandManager = new EngineCommandManager({
setIsStreamReady: () => {},
setMediaStream: () => {},
})
engineCommandManager.startNewSession()
const programMemory = await _executor(ast, pm, engineCommandManager)
await engineCommandManager.waitForAllCommands()