Shortcuts can do a lot with media, which includes music, images, and more. Here are a few examples of what you can do with the media-related actions.
I use this shortcut with two automations: when I connect to CarPlay, and when I connect to bluetooth devices (my AirPods). With just a few taps, I can tell my device to play music or a podcast.
Here’s how to build this shortcut:
Add a Choose from Menu action.
Change “One” and “Two” to Music
and Podcast
and add a third option Cancel
.
Under the Music option, add a Get Current Song action.
Under “Get current song,” add an If action and delete the Otherwise.
Make sure your If uses Current Song
as the input and set the condition to does not have any value
.
Right under If [Current Song] [does not have any value]
, add the action to Get Playlist.
Choose a playlist to get the songs from.
After End If (but before Podcast), add a Play Music action.
This should automatically use If Result
as the song to play. Because we deleted the Otherwise step, if there is a current song that is passed through, and if not then a song from our playlist is played.
Under the Podcast option, add a Get Podcasts from Library action.
Beneath Get Podcasts from Library, add a Choose from List action.
Set the List to Podcasts
if Shortcuts doesn’t set it automatically.
Below Choose from Podcasts
, add a Play Podcast action.
Set the Podcast to the Chosen Item
(from step 7), if it isn’t set automatically.
After Cancel but before End Menu, add an Exit Shortcut action.
Add Set Playback Destination as the very last action, after End Menu.
Tap the type of your device (e.g. iPad
) and change it to Ask Each Time
.
Tap Next, give the shortcut a name and icon, and tap Done.
Install Play Audio shortcut: https://alt.cc/shpa
When I want to change the noise cancelling on my AirPods Pro, the last thing I want to do is to dive into Settings, Bluetooth, etc. If your devices are set up to change when you press and hold the stems, this shortcut may be less useful, but you can still include the primary action in other shortcuts—such as the audio playback example above.
There are two ways to approach this, and I detail both here.
Let’s look at the one-action version first:
Add the Set Noise Control Mode action.
Set Route to your AirPods Pro if Shortcuts doesn’t do this automatically. (You may need to open your AirPods Pro case and hold it open near your device to be able to do this.) Set the Noise Control Mode to Ask Each Time
.
Tap Next, give the shortcut a name and icon, and tap Done.
Install Set AirPods Pro Noise Cancelling (menu) shortcut: https://alt.cc/sham
This shortcut works perfectly, but it opens Shortcuts every time you run it. If you prefer, you can change the shortcut to use a menu instead (Figure 52 illustrates the difference).
Using a menu instead of Ask Each Time offers multiple advantages:
Shortcuts does not open when you run the app from the Today widget.
You can choose your option with Siri, and don’t need to touch your device to control it.
To make the menu version of this shortcut:
Add a Choose from Menu action.
Change “One” to Transparency
and “Two” to Noise Cancelling
.
Right under Transparency, add a Set Noise Control Mode action.
Set the Route to your device (if not done automatically) and the Noise Control Mode to Transparency
.
Under Noise Cancelling, add a Set Noise Control Mode action.
Set the Route to your device (if not done automatically) and the Noise Control Mode to Noice Cancelling
.
Tap Next, give the shortcut a name and icon, and tap Done.
Install Set AirPods Pro Noise Cancelling (ask for each) shortcut: https://alt.cc/shaa
I have been exploring Apple Music’s playlists recently and keep finding great songs I want to listen to again, but I’m much too lazy to add these to my playlist My Music Library by hand, so I built a Shortcut to do it for me!
Here are the two actions we need:
Add a Get Current Song action.
Add an Add Song to Playlist action.
This should automatically select the Current Song
from step 1, and then choose an appropriate playlist (Figure 53).
Tap Next, give the shortcut a name and icon, and tap Done.
Install Add Current Song to Playlist shortcut: https://alt.cc/shcs