[gnome-shell/wip/fmuellner/volume-change-feedback: 6/6] volume: Skip volume-change feedback while playing



commit 2894085c45526bf2c7ea96b6374acd05f597e4b7
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Nov 22 18:37:25 2019 +0100

    volume: Skip volume-change feedback while playing
    
    The audio feedback for volume changes is useful when nothing is outputting
    sound, but only then. Skip the sound notification in that case.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/issues/53

 js/ui/status/volume.js | 3 +++
 1 file changed, 3 insertions(+)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 87b24e04a0..5ffb18989f 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -138,6 +138,9 @@ var StreamSlider = class {
     }
 
     _notifyVolumeChange() {
+        if (this._stream.state === Gvc.MixerStreamState.RUNNING)
+            return; // feedback not necessary while playing
+
         if (this._volumeCancellable)
             this._volumeCancellable.cancel();
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]