This commit is contained in:
choelzl 2022-02-24 02:33:27 +01:00
parent 0ecc2ee808
commit 659a115b3d
Signed by: sora
GPG Key ID: A362EA0491E2EEA0

View File

@ -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')){