fix: mute function did not mute

This commit is contained in:
José Carlos Cuevas 2023-12-06 16:32:47 +01:00
parent 0a75f65a02
commit 822094de4c

View file

@ -228,6 +228,7 @@ func (player *StreamPlayer) Mute() {
if player.IsPlaying() {
if player.otoPlayer.Volume() > 0 {
player.currentVolume = player.otoPlayer.Volume()
player.otoPlayer.SetVolume(0.0)
} else {
player.otoPlayer.SetVolume(player.currentVolume)
}