From 353cd16021ea1610fc1165006efc56e90b37096d Mon Sep 17 00:00:00 2001 From: Smittix Date: Thu, 15 Jan 2026 14:19:28 +0000 Subject: [PATCH] Add volume control for airband listening on ADS-B dashboard - Add volume slider with speaker icon next to squelch control - Apply initial volume when audio starts - Add updateAirbandVolume() function for real-time volume changes --- templates/adsb_dashboard.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/templates/adsb_dashboard.html b/templates/adsb_dashboard.html index b24556f..fe267df 100644 --- a/templates/adsb_dashboard.html +++ b/templates/adsb_dashboard.html @@ -192,6 +192,10 @@ + + 🔊 + + OFF @@ -2271,6 +2275,10 @@ sudo make install const audioPlayer = document.getElementById('airbandPlayer'); audioPlayer.src = '/listening/audio/stream?' + Date.now(); + // Apply current volume setting + const volume = parseInt(document.getElementById('airbandVolume').value) || 80; + audioPlayer.volume = volume / 100; + // Initialize visualizer before playing initAirbandVisualizer(); @@ -2315,6 +2323,14 @@ sudo make install .catch(() => {}); } + function updateAirbandVolume() { + const audioPlayer = document.getElementById('airbandPlayer'); + const volume = parseInt(document.getElementById('airbandVolume').value) || 80; + if (audioPlayer) { + audioPlayer.volume = volume / 100; + } + } + // Initialize airband on page load document.addEventListener('DOMContentLoaded', initAirband);