Coordinated play/pause + mute/unmute + slider volume

Here is a a combination of a

  1. a quite standard mute/unmute widget
  2. a play/pause button (controlling ONLY itunes)
  3. a volume slider.
  4. a two finger slide on the touchbar is also used as a volume slider (for fine tuning)

But those three are coordinated:

  1. clicking the mute button put the (itunes) music in pause (and update the associated widget)
  2. clicking the play button automatically unmute the sound (and update the associated widget)
  3. the color of the slider is set on red if the sound is muted.
  4. when using two finger scroll, the sound is unmuted and the widget (and color of the slider) are updated

Here is two visual display (one in mute and one in unmute)
44
56

A scenario not working perfectly:

  1. when the sound is muted using the slider restore the sound but do not update the color of the slider (and the mute/unmute button). One solution is to increase the refresh rate of the mute/unmute widget.

Note about the json:
the various widget interacts via the their UUID. Therefore you will need to update such UUID to match your setup. In front of each part of the code,

Nice!
You can already attach the json as a file here :slight_smile:

Oh nice,
I just changed the icon to use some more compact one (using the one of your mute/unmute example)
this is the full preset then:

music.json (105.5 KB)

Since you have to edit the UUID in the various script to make it works. I note here the UUID on my setup:
mute/unmute: 735EEE07-91A0-40F8-B246-72B61D6CB5ED
slider: 13B48402-3A3B-4371-BFB0-39785ED54D38
play/pause: 13B48402-3A3B-4371-BFB0-39785ED54D38