diff --git a/public/index.html b/public/index.html index 67f1d178..9a322cad 100644 --- a/public/index.html +++ b/public/index.html @@ -92,7 +92,7 @@ - + diff --git a/public/live.js b/public/live.js index be9e3748..201fc558 100644 --- a/public/live.js +++ b/public/live.js @@ -8,8 +8,6 @@ let activeAnims = 0; let nodeActivity = {}; let recentPaths = []; - let audioCtx = null; - let soundEnabled = false; let showGhostHops = localStorage.getItem('live-ghost-hops') !== 'false'; let realisticPropagation = localStorage.getItem('live-realistic-propagation') === 'true'; let showOnlyFavorites = localStorage.getItem('live-favorites-only') === 'true'; @@ -48,21 +46,6 @@ REQUEST: '❓', RESPONSE: '📨', TRACE: '🔍', PATH: '🛤️' }; - function playSound(typeName) { - if (!soundEnabled || !audioCtx) return; - try { - const osc = audioCtx.createOscillator(); - const gain = audioCtx.createGain(); - osc.connect(gain); gain.connect(audioCtx.destination); - const freqs = { ADVERT: 880, GRP_TXT: 523, TXT_MSG: 659, ACK: 330, REQUEST: 740, TRACE: 987 }; - osc.frequency.value = freqs[typeName] || 440; - osc.type = typeName === 'GRP_TXT' ? 'sine' : typeName === 'ADVERT' ? 'triangle' : 'square'; - gain.gain.setValueAtTime(0.03, audioCtx.currentTime); - gain.gain.exponentialRampToValueAtTime(0.001, audioCtx.currentTime + 0.15); - osc.start(audioCtx.currentTime); osc.stop(audioCtx.currentTime + 0.15); - } catch {} - } - function initResizeHandler() { let resizeTimer = null; _onResize = function() { @@ -627,7 +610,6 @@
0 active
0/min
-
Overlay a density heat map on the mesh nodes @@ -767,13 +749,6 @@ map.on('zoomend', rescaleMarkers); - // Sound toggle - document.getElementById('liveSoundBtn').addEventListener('click', () => { - if (!audioCtx) audioCtx = new (window.AudioContext || window.webkitAudioContext)(); - soundEnabled = !soundEnabled; - document.getElementById('liveSoundBtn').textContent = soundEnabled ? '🔊' : '🔇'; - }); - // Heat map toggle document.getElementById('liveHeatToggle').addEventListener('change', (e) => { if (e.target.checked) showHeatMap(); else hideHeatMap(); @@ -1446,7 +1421,6 @@ const hops = decoded.path?.hops || []; const color = TYPE_COLORS[typeName] || '#6b7280'; - playSound(typeName); if (window.MeshAudio) MeshAudio.sonifyPacket(pkt); addFeedItem(icon, typeName, payload, hops, color, pkt); addRainDrop(pkt); @@ -1495,7 +1469,7 @@ // Favorites filter: skip if none of the packets involve a favorite if (showOnlyFavorites && !packets.some(p => packetInvolvesFavorite(p))) return; - playSound(typeName); + if (window.MeshAudio) MeshAudio.sonifyPacket(first); // Rain drop per observation in the group packets.forEach((p, i) => setTimeout(() => addRainDrop(p), i * 150));