waitFor

View as Markdown

waitFor

  • waitFor(params): Promise<boolean>

Returns a promise that is resolved only after the current call is in one of the specified states.

Parameters

NameType
params"ended" | "ending" | ("ended" | "ending")[]

Returns

Promise<boolean>

true if the requested states have been reached, false if they won’t be reached because the call ended.

Example

1await call.waitFor("ended");