function isUserInteraction() { const detectionElement = window.document.createElement('audio'); detectionElement.play(); return !detectionElement.paused; }