audio mute switch

This commit is contained in:
Til Schmitter 2026-04-27 19:54:31 +02:00
parent 63e094e436
commit 89c9623275

View file

@ -2791,6 +2791,18 @@ var vbar = (function () {
ebi('pvolbg').ontouchstart = can.ontouchstart = mousedown;
ebi('pvolbg').ontouchmove = can.ontouchmove = mousemove;
}
var mute = ebi('pvolbg').children[0];
mute.onclick = function (e) {
ev(e);
if(mp.vol > 0)
mp.setvol(0);
else
mp.setvol(1);
r.draw();
}
mute.onmousedown = function (e) {
ev(e);
}
return r;
})();