fix: add set_volume handler to player_lite.html for mute toggle

player_lite (Live TV desktop) ignored set_volume messages from Flutter,
so mute/unmute button had no effect. Added handler matching player.html.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Opus 4.7 committed 2026-05-03 08:40:48 +02:00
1 parent b985f11704
commit cb5eca7547
1 file changed
+1
+1
View File
@@ -350,6 +350,7 @@
const data = event.data;
if (data.type === 'play') video.play().catch(() => playOverlay.style.display = 'flex');
else if (data.type === 'pause') video.pause();
else if (data.type === 'set_volume') { video.volume = Math.max(0, Math.min(1, data.value)); video.muted = video.volume === 0; }
});
initPlayer();