mirror of
https://github.com/smittix/intercept.git
synced 2026-07-22 00:08:10 -07:00
Fix airband audio element - remove crossorigin, add controls
- Remove crossorigin="anonymous" attribute that may cause CORS issues - Add controls attribute so user can manually play if autoplay blocked - Show/hide audio player element when listening starts/stops - Hide visualizer container on stop Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -274,7 +274,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<audio id="airbandPlayer" style="display: none;" crossorigin="anonymous"></audio>
|
<audio id="airbandPlayer" controls style="display: none; width: 100%; max-width: 300px; height: 32px; margin-top: 8px;"></audio>
|
||||||
</div>
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
@@ -3073,6 +3073,7 @@ sudo make install</code>
|
|||||||
document.getElementById('airbandStatus').textContent = frequency.toFixed(3) + ' MHz';
|
document.getElementById('airbandStatus').textContent = frequency.toFixed(3) + ' MHz';
|
||||||
document.getElementById('airbandStatus').style.color = 'var(--accent-green)';
|
document.getElementById('airbandStatus').style.color = 'var(--accent-green)';
|
||||||
document.getElementById('airbandVisualizerContainer').style.display = 'flex';
|
document.getElementById('airbandVisualizerContainer').style.display = 'flex';
|
||||||
|
document.getElementById('airbandPlayer').style.display = 'block';
|
||||||
|
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.error('[AIRBAND] Error:', err);
|
console.error('[AIRBAND] Error:', err);
|
||||||
@@ -3089,6 +3090,7 @@ sudo make install</code>
|
|||||||
const audioPlayer = document.getElementById('airbandPlayer');
|
const audioPlayer = document.getElementById('airbandPlayer');
|
||||||
audioPlayer.pause();
|
audioPlayer.pause();
|
||||||
audioPlayer.src = '';
|
audioPlayer.src = '';
|
||||||
|
audioPlayer.style.display = 'none';
|
||||||
|
|
||||||
fetch('/listening/audio/stop', { method: 'POST' })
|
fetch('/listening/audio/stop', { method: 'POST' })
|
||||||
.then(r => r.json())
|
.then(r => r.json())
|
||||||
@@ -3098,6 +3100,7 @@ sudo make install</code>
|
|||||||
document.getElementById('airbandBtn').classList.remove('active');
|
document.getElementById('airbandBtn').classList.remove('active');
|
||||||
document.getElementById('airbandStatus').textContent = 'OFF';
|
document.getElementById('airbandStatus').textContent = 'OFF';
|
||||||
document.getElementById('airbandStatus').style.color = 'var(--text-muted)';
|
document.getElementById('airbandStatus').style.color = 'var(--text-muted)';
|
||||||
|
document.getElementById('airbandVisualizerContainer').style.display = 'none';
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user