diff --git a/web/alert/index.js b/web/alert/index.js index 483386e..7ff25ea 100644 --- a/web/alert/index.js +++ b/web/alert/index.js @@ -12,7 +12,7 @@ $(async function () { $(audio).on("loadedmetadata", function() { resolve(audio); }); - audio.volume = Math.max(1,Math.min(0,volume/100.0)); + audio.volume = Math.min(1,Math.max(0,volume/100.0)); audio.src = src; audio.play().catch((err)=>{ if(err.toString().startsWith('NotAllowedError')){