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
Novidades
First release
O que ele faz
6 ações-
Is Audio Playingcom.alexhay.ToolboxProForShortcuts
-
If
-
Play/Pause
-
Run ShortcutAirPods
-
If
-
Set Silent Modecom.apple.ShortcutsActions
Ver como código
Todas as ações deste atalho escritas em Cherri, uma linguagem de programação para o app Atalhos. Ótimo para aprender como ele 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"
})
}
Avaliações e comentários
Escrever uma avaliaçãoAinda não há avaliações. Seja o primeiro a compartilhar o que você pensa!