Fix player volume comparison

This commit is contained in:
Rafostar
2020-11-26 13:02:31 +01:00
parent d630717b24
commit bc5aa45a8f

View File

@@ -462,8 +462,11 @@ var Widget = GObject.registerClass({
_onPlayerVolumeChanged(player) _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)); let volume = Number(player.get_volume().toFixed(2));
if(volume === this.currentVolume) if(volume === this.controls.currentVolume)
return; return;
this.controls.currentVolume = volume; this.controls.currentVolume = volume;