File size: 650 Bytes
d00f4a3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | // Global error handler
window.addEventListener('error', function(event) {
console.error('Global error:', event.error);
});
// Audio context state monitoring
function monitorAudioContext() {
if (typeof Tone !== 'undefined') {
console.log('Audio context state:', Tone.context.state);
}
}
// Check for Web Audio API support
if (!window.AudioContext && !window.webkitAudioContext) {
console.error('Web Audio API not supported in this browser');
alert('This experience requires Web Audio API support. Please try a modern browser like Chrome or Firefox.');
}
// Export functions if needed
export {
monitorAudioContext
}; |