A volume slider
Build a slider that sets the Windows master volume and follows it when the volume changes elsewhere.
You need: a paired device (see Pair a device).
- In the editor's Toolbox, click Slider. Resize it so it is wide (a full row works well).
- In the Properties panel set Min to
0, Max to100and Step to1. Give it a caption such asVolume. - Under Variable driving its position pick
system.audio.master. The slider now shows the current volume and moves when it changes. - Under Actions, on Value changed, click + Add action and choose Master volume. It applies the slider's value.
- Click Save.
Drag the slider on your phone: the Windows volume follows when you release. Change the volume with your keyboard's volume keys and the slider moves.
Add a mute button
- Add a Toggle with the text
Mute. - On Turns on add Mute/unmute with Mute. On Turns off add the same action with Unmute.
- To keep the toggle honest when you mute from elsewhere, use a dynamic rule on its background: if
system.audio.mutedequaltrue, red.
TIP
Instead of a toggle you can use a plain Button with the Toggle mute action, and a dynamic text such as {system.audio.muted|MUTED/LIVE}.
