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
Novedades
First release
Qué hace
6 acciones-
Is Audio Playingcom.alexhay.ToolboxProForShortcuts
-
If
-
Play/Pause
-
Run ShortcutAirPods
-
If
-
Set Silent Modecom.apple.ShortcutsActions
Ver como código
Todas las acciones de este atajo escritas en Cherri, un lenguaje de programación para Atajos. Ideal para aprender cómo funciona.
#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"
})
}
Valoraciones y reseñas
Escribe una reseñaAún no hay reseñas. ¡Sé el primero en compartir tu opinión!