Action Button toggle silent and also Pause audio
I've just finished my shortcut I use with the action button on my Iphone 17.
Running the shortcut checks if there is any audio playing, if not then it toggles silent mode; if audio is playing then it pauses the audio, unless you are using AirPods, in which case it pauses the audio and then sets the noise cancelling mode to Transparency.
You will need both shortcuts, the one titles Action Button and also the on titles AirPods .
I have a more finessed version that changes the focus when I have silent mode toggled on, but this version runs perfectly
Nyheder
First release
Hvad den gør
6 handlinger-
Is Audio Playingcom.alexhay.ToolboxProForShortcuts
-
If
-
Play/Pause
-
Run ShortcutAirPods
-
If
-
Set Silent Modecom.apple.ShortcutsActions
Vis som kode
Alle genvejens handlinger skrevet ud i Cherri, et programmeringssprog til genveje. Perfekt til at lære, hvordan den virker.
#define color darkblue
#define glyph waveform
rawAction("com.alexhay.ToolboxProForShortcuts.IsAudioPlayingIntent", {})
if IsAudioPlayingResult == 1 {
play()
run("AirPods", IsAudioPlayingResult)
} else {
rawAction("com.apple.ShortcutsActions.SetSilentModeAction", {
"AppIntentDescriptor": "",
"operation": "toggle"
})
}
Bedømmelser og anmeldelser
Skriv en anmeldelseIngen anmeldelser endnu. Vær den første!