entersState (2)

Allows an audio player a specified amount of time to enter a given state, otherwise rejects with an error.
declare function entersState(target: AudioPlayer, status: AudioPlayerStatus, timeoutOrSignal: number | AbortSignal): Promise<AudioPlayer>;
NameTypeOptionalDescription
targetAudioPlayerNo
The audio player that we want to observe the state change for
statusAudioPlayerStatusNo
The status that the audio player should be in
timeoutOrSignalnumber | AbortSignalNo
The maximum time we are allowing for this to occur, or a signal that will abort the operation