Scrollrad steuert Lautstärke in 4er-Schritten
All checks were successful
Build and push Docker image / build (push) Successful in 12s
Test / test (push) Successful in 13s

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
marwin 2026-03-16 21:35:27 +01:00
parent 5c7ab8fb8f
commit cb3b27f0c6

View file

@ -205,6 +205,16 @@ if (volNumEl) {
volNumEl.addEventListener('click', function () { this.select(); });
}
const volSliderEl2 = document.getElementById('volume');
const volWheelTarget = volSliderEl2 || volNumEl;
if (volWheelTarget) {
volWheelTarget.addEventListener('wheel', function (e) {
e.preventDefault();
const current = parseInt(document.getElementById('volume').value, 10);
setVolume(current + (e.deltaY < 0 ? 4 : -4));
}, { passive: false });
}
// ---------------------------------------------------------------------------
// SSE metadata
// ---------------------------------------------------------------------------