1

I am using ios 17.1

Sometimes I fall asleep with a TV show playing on my iPhone then I am awakened hours later at a noisy part of the show because it autoplayed next few episodes.

Being awakened is annoying.

If I remember before I start watching, I can set a sleep timer for an app to stop playing sound or video by using the Timer app and instead of an alarm select “stop playing”. But often I forget to set this.

So I would like something that stops the audio and ideally also the video at a set time of night. Eg 11.59pm

I was trying to do this with an automation in shortcuts app. I can see how to automatically open an app. I can’t see how you automatically close an app.

Another option would be to automatically start a timer for one minute at 11:59 with the timer set to ‘stop playing’ instead of an alarm sound. But I can’t see how to choose the end of timer action in shortcuts.

I suppose an alternative approach would be to use screen time, but I don’t really want to use that. I prefer to use an automation.

What is the instruction or code I need in my shortcut?

1 Answer 1

3

So I would like something that stops the audio and ideally also the video at a set time of night. Eg 11.59pm

This requires a single action item for the shortcut and an equally simple automation that runs at 11:59pm every night:

  • Play/Pause Action of your device
  • Time of Day Automation

Below is a screenshot of the single line Shortcut action. The name of the action is Play/Pause on device with the Pause action specified. If you leave it as Play/Pause it will toggle between states, meaning if it's playing, it will stop, but if stopped it will start to play.

Shortcut Image 1 enter image description here

Next, set up the automation so that it runs every day at a pre-determined time (11:59pm). It is set to run immediately as opposed to after confirmation so that it will stop the media being played without user intervention.

Automation Image 1 Automation Image 2

Here is the final "product" of the automation and shortcut. At 11:59 every day, whatever is playing will be stopped by this time of day automation.

Automation Image 3

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .