The state read-only property of the BaseAudioContext interface returns the current state of the AudioContext.
state
AudioContext
MDN Reference