Here is a a combination of a
- a quite standard mute/unmute widget
- a play/pause button (controlling ONLY itunes)
- a volume slider.
- a two finger slide on the touchbar is also used as a volume slider (for fine tuning)
But those three are coordinated:
- clicking the mute button put the (itunes) music in pause (and update the associated widget)
- clicking the play button automatically unmute the sound (and update the associated widget)
- the color of the slider is set on red if the sound is muted.
- 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)
A scenario not working perfectly:
- 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,