Preview
Plays a selected playlist for a selected period of time, either locally, or to a remote speaker and then shuts down. Perfect to play quiet music while you fall asleep. Note: the timer app must be set to 'stop playing' when the timer ends. This is not programmable in shortcuts.
Adjust the code for your playlist and speaker name.
What's New
Version 1.0
First release
What it does
15 actions-
Show NotificationTimer app must be set to "Stop Playing" when timer ends.
-
Setplaybackdestination
-
Choose from MenuPlay Duration (mins)?
-
Choose from Menu15
-
Start Timer
-
Choose from Menu30
-
Start Timer
-
Choose from Menu45
-
Start Timer
-
Choose from Menu60
-
Start Timer
-
Choose from MenuContinuous
-
Set Volume
-
Play Music
-
Open App
View as code
Every action of this Shortcut written out as Cherri, a programming language for Shortcuts. Great for learning how it works.
#define color darkorange
#define glyph clock
showNotification("Timer app must be set to \"Stop Playing\" when timer ends. ", "Important", false)
rawAction("is.workflow.actions.setplaybackdestination", {
"WFMediaRoute": ""
})
const MenuResult = menu " Play Duration (mins)?" {
item "15":
startTimer()
item "30":
startTimer()
item "45":
startTimer()
item "60":
startTimer()
item "Continuous":
}
setVolume(0.18214285)
playMusic(, "Songs", "All")
openApp("com.apple.Music")
Open in Cherri Playground
Decompiled with cherri 2.3.0 (GPL-2.0). May need small fixes before it compiles.
Ratings & Reviews
Write a Review–
out of 5
★★★★★
★★★★
★★★
★★
★
0 ratings
No reviews yet. Be the first to share what you think!
Advertisement
More by gramps
You Might Also Like
Advertisement