navigator.audioSession.addEventListener("statechange", () => {
statusElement.textContent = `Audio session: ${navigator.audioSession.state}`;
});AudioSession: state property / notebook
AudioSession: state property
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.