Why is there no stop music action available in shortctus on ios? There is only play or play/pause.

I asked AI for a solution to a shortcut to play random music for certain durations to help with the stationary bike routine.

—

### 🚴‍♂️ **Steps to Create the Shortcut**

1. **Open the Shortcuts App** on your iPhone.

2. **Tap “+” to Create a New Shortcut**
Name it something like **”Bike Workout with Music”**.

3. **Add Actions:**

#### 1️⃣ **Warm-Up (5 Minutes)**
– **Action:** *Find Music*
– Filter: *Songs*
– Condition: *Duration* is around 5 minutes (adjust the range to 4–6 minutes for flexibility).
– Sort by *Random*
– Limit to *1 Song*
– **Action:** *Play Music* (plays the selected song).

#### 2️⃣ **Workout Rounds (20 Minutes)**
For each of the 4 rounds:
– **Steady-State (4 Minutes):**
– *Find Music* with a duration around 4 minutes (3.5–4.5 mins).
– *Play Music*.

– **Sprint (1 Minute):**
– *Find Music* with a duration around 1 minute (0:45–1:15 mins).
– *Play Music*.

*(Tip: Use the “Repeat” action to loop this sequence 4 times.)*

#### 3️⃣ **Cool-Down (5 Minutes)**
– *Find Music* (4–6 minutes duration).
– *Play Music*.

4. **Optional Enhancements:**
– **Shuffle Playlist:** Instead of random songs each time, create a custom playlist for workout songs and shuffle them.
– **Add Spoken Cues:** Use the *Speak Text* action to announce “Warm-up starting,” “Sprint!” etc.

5. **Save the Shortcut** and test it before your workout.

But it doesn’t work ok because the *Play Music* action in Shortcuts doesn’t wait for a song to finish before moving to the next action. To fix this, we’ll add a **“Wait”** action that matches each song’s duration. Here’s the updated process:

### 🚴‍♂️ **Fixing the Shortcut to Play Songs Sequentially**

—

### **1. Open the Shortcut**

– Go to the Shortcuts app.
– Tap to edit your workout shortcut.

### **2. Modify the Song Playback Sequence**

For **each workout segment (warm-up, steady-state, sprint, cool-down):**

1. **Find Music**
– *Filter:* Songs with duration in the desired range (e.g., 4–6 mins for warm-up).
– *Sort by:* Random.
– *Limit:* 1 song.

2. **Get Details of Music**
– Add the action: **“Get Details of Music”** → Choose **“Duration”**.
– This will fetch the exact length of the selected song in seconds.

3. **Play Music**
– Add the **“Play Music”** action.

4. **Wait**
– Add the **“Wait”** action.
– Tap the small variable icon and select the **“Duration”** from the previous step.
– This makes the shortcut wait exactly as long as the song plays before moving to the next action.

—

### 🔁 **Repeat for All Segments**

– Add the same sequence (Find Music → Get Duration → Play Music → Wait) for:
– Warm-up (5 mins)
– 4 Steady-State Rounds (4 mins each)
– 4 Sprints (1 min each)
– Cool-down (5 mins)

—

### ✅ **Test the Shortcut**

Run it once to ensure it waits properly between songs.

Here’s an outline for creating an Apple Shortcut to automate your stationary bike workout with songs as timers:

### **Shortcut Features:**
– **Random song selection** based on the duration of each workout segment.
– **Automatic sequencing** of songs for warm-up, workout rounds (steady-state + sprints), and cool-down.