User Tools

Site Tools


hacks:pauseonmute

Pause On Mute

By default, on mute, playback continues without sound. The most logical action when muting is for playback to pause where possible (e.g. USB, Bluetooth etc.)

This tweak will trigger a pause on muting and release the pause when unmuting. There is no change to radio behavior.

This tweak is tested on FM, AM, USB, Bluetooth and CD. The 'net based sources (e.g. Pandora) are not tested at time of writing but are suspected to work based on code inspection. If you try them please update this page accordingly.

The Tweak

in /jci/gui/common/js/Common.js, in the function _HandleStatusUpdateVolume, after the line

             this._isMutedChanged();

at line 2194 (v55), all you need to do is insert the lines:

            framework.sendEventToMmui(
                "Common",
                isMuted ? "Global.Pause" : "Global.Resume");

In patch form

The same change can be expressed as:

index 6e0051a..9746306 100755
--- a/gui/common/js/Common.js
+++ b/gui/common/js/Common.js
@@ -2191,6 +2191,9 @@ Common.prototype._HandleStatusUpdateVolume = function(msg)
         {
             this._isMuted = isMuted;
             this._isMutedChanged();
+            framework.sendEventToMmui(
+                "Common",
+                isMuted ? "Global.Pause" : "Global.Resume");
         }
     }
 };