From bc5aa45a8feb8191a58512b7fca44be883916096 Mon Sep 17 00:00:00 2001 From: Rafostar <40623528+Rafostar@users.noreply.github.com> Date: Thu, 26 Nov 2020 13:02:31 +0100 Subject: [PATCH] Fix player volume comparison --- clapper_src/widget.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clapper_src/widget.js b/clapper_src/widget.js index 7a26401a..41c29734 100644 --- a/clapper_src/widget.js +++ b/clapper_src/widget.js @@ -462,8 +462,11 @@ var Widget = GObject.registerClass({ _onPlayerVolumeChanged(player) { + /* FIXME: This check should not be needed, GstPlayer should not + * emit 'volume-changed' with the same values. It needs to be + * fixed inside GStreamer GstPlayer API */ let volume = Number(player.get_volume().toFixed(2)); - if(volume === this.currentVolume) + if(volume === this.controls.currentVolume) return; this.controls.currentVolume = volume;