Fix peripheral volume_muted state (#403)
Enable updating the `volume_muted` status when muting/unmuting the media player volume, and improve its tracking.
This commit is contained in:
1 parent
e334aa3fb1
commit
8303a96279
12 files changed
+177
-18
No files matched your search
@@ -361,7 +361,12 @@
|
||||
volBar.style.width = pct + '%';
|
||||
}
|
||||
if (ev === 'volume_muted' && data) {
|
||||
metaMuted.textContent = data.muted ? 'yes' : 'no';
|
||||
const isMuted = !!data.muted;
|
||||
metaMuted.textContent = isMuted ? 'yes' : 'no';
|
||||
if (isMuted) {
|
||||
metaVol.textContent = '0%';
|
||||
volBar.style.width = '0%';
|
||||
}
|
||||
}
|
||||
if (ev === 'zeroconf' && data) {
|
||||
metaHa.textContent = data.status === 'connected' ? 'yes' : 'connecting…';
|
||||
|
||||
Reference in new issue
Block a user