From 713b25f36a09b18998c74c89d0e06f6337e8169d Mon Sep 17 00:00:00 2001 From: mrwnslz Date: Fri, 2 Oct 2026 14:39:15 +0200 Subject: [PATCH] =?UTF-8?q?Web:=20der=20Lautst=C3=A4rkeregler=20gilt=20auc?= =?UTF-8?q?h=20f=C3=BCr=20Podcasts,=20sw=20v57?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 --- static/js/podcasts-web.js | 18 +++++++++++++++++- static/js/sw.js | 2 +- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/static/js/podcasts-web.js b/static/js/podcasts-web.js index 80d107c..9f529cf 100644 --- a/static/js/podcasts-web.js +++ b/static/js/podcasts-web.js @@ -548,9 +548,25 @@ applyVolume(); } + // The bar's volume slider (app.js setVolume, 0-255): one level for radio and podcasts. + function barVolume() { + const s = document.getElementById('volume'); + const v = s ? parseInt(s.value, 10) : NaN; + return isFinite(v) ? Math.max(0, Math.min(255, v)) / 255 : 1; + } + function applyVolume() { // Louder than 1 needs an audio graph, which episodes from other servers can't feed: 1 at most. - audio.volume = Math.max(0, Math.min(1, Math.min(volumeFor(curFeed()), 1) * fade)); + audio.volume = Math.max(0, Math.min(1, Math.min(volumeFor(curFeed()), 1) * fade * barVolume())); + } + + if (typeof window.setVolume === 'function') { + const setVolume = window.setVolume; + window.setVolume = function () { + const r = setVolume.apply(this, arguments); + applyVolume(); + return r; + }; } function applyKind() { diff --git a/static/js/sw.js b/static/js/sw.js index 0b88e38..cd373e2 100644 --- a/static/js/sw.js +++ b/static/js/sw.js @@ -2,7 +2,7 @@ * diora service worker — caches the app shell for offline use. */ -const CACHE = 'diora-v56'; +const CACHE = 'diora-v57'; const SHELL = [ '/static/css/app.css', '/static/js/app.js',