# iPhone locks while audio is playing, audio stops

**URL:** https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224
**Category:** Report a Bug
**Created:** [September 3, 2020, 5:42pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224 "2020-09-03T17:42:54Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 5:42pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/1 "2020-09-03T17:42:54Z")

</div>

Hello,

I have an app that’s rich with media. I have both video files and audio files. When I play video, all is well, the iphone doesn’t lock in the middle of playing, but when I play audio, after 30 seconds, the iphone locks and the audio stops playing. Any solutions?

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [September 3, 2020, 5:51pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/2 "2020-09-03T17:51:55Z")

</div>

This is an IOS limitation with PWAs. You can always adjust your screen timeout. 😉

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 6:10pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/3 "2020-09-03T18:10:46Z")

</div>

@Jeff_Hager it’s not about my own experience, it’s about the user experience. I’m not going to tell people to start adjusting their time out, this is not how the world works. Users should not have to adjust anything to be able to use our apps. Any actual solutions to this?

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [September 3, 2020, 6:12pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/4 "2020-09-03T18:12:48Z")

</div>

It is a known issue as jeff states

> [@Audio stops playing when screen locks](https://community.glideapps.com/t/audio-stops-playing-when-screen-locks/1977):
>
> My app’s URL: [ondesignfm.glideapp.io](http://ondesignfm.glideapp.io) Hi team. Little bug. audio stops playing when iPhone screen locks, starts playing when unlocking. audio is loaded with =importxml. please make the audio play in the background, as it does on Android. the app is installed on the home screen Find hear the first mention: [Podcast discovery app!](https://community.glideapps.com/t/podcast-discovery-app/1823/2) Note: Audio doesn’t start playing when tapping on Airpods! But maybe that’s a feature wink Thanks!

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 6:25pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/5 "2020-09-03T18:25:41Z")

</div>

Ugh. Guess I’ll have to put a button to open the audio URL outside the app, just like I did with the PDF bug. I find myself compromising a lot on the user experience.

---

<div class="post-metadata">

### Author: ![Thomas\_Dahm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thomas_dahm/32/142_2.png) [@Thomas\_Dahm](https://community.glideapps.com/u/Thomas_Dahm)
#### Post date: [September 3, 2020, 6:45pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/6 "2020-09-03T18:45:01Z")

</div>

If your audio is on SoundCloud the audio keeps playing when an iPhone locks. Because SoundCloud renders audio as video…!

An other solution could be to take the audio from YouTube or Vimeo if that works for you…

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 6:48pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/7 "2020-09-03T18:48:33Z")

</div>

Thanks @Thomas_Dahm, these are good solutions 😍. I’ll have to consider this, since we have hundreds of audio files and it would be cumbersome and inefficient to have them in more than one location. I think using a button is an ok solution for now.

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 9:21pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/8 "2020-09-03T21:21:44Z")

</div>

![Screen Shot 2020-09-03 at 11.20.31 AM](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/8/852f17a1855d6573638e33c609089096d22dc1c3.png) Here’s what I ended up doing, I added buttons “listen” that link to the audio file outside Glide. I hope this helps others with the same issue 😌

---

<div class="post-metadata">

### Author: ![Krivo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/krivo/32/5363_2.png) [@Krivo](https://community.glideapps.com/u/Krivo)
#### Post date: [September 3, 2020, 9:24pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/9 "2020-09-03T21:24:29Z")

</div>

So you use an action “open link” on the button?

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 3, 2020, 9:25pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/10 "2020-09-03T21:25:39Z")

</div>

Yes, indeed

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 9, 2020, 4:08am UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/11 "2020-09-09T04:08:13Z")

</div>

Hi @Thomas_Dahm I tried your suggestion of using soundcloud, the audio played more than 30 seconds, around 1 minute, but then it stopped even without the iPhone locking up…any idea?

---

<div class="post-metadata">

### Author: ![Thomas\_Dahm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thomas_dahm/32/142_2.png) [@Thomas\_Dahm](https://community.glideapps.com/u/Thomas_Dahm)
#### Post date: [September 9, 2020, 10:22pm UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/12 "2020-09-09T22:22:18Z")

</div>

@SuperMerabh I had to test several times again… you are right also Soundcloud stops when you selecting play in browser. They probably have changed something, it worked before… (in the early days of Glide!)  
For audio, I don’t really know another hack other than changing your screen settings to “don’t lock your screen” or make videos from your audio files en publish them on youtube. Which you then can repost on social when… and gets you probably more visitors as well!

---

<div class="post-metadata">

### Author: ![SuperMerabh](https://avatars.discourse-cdn.com/v4/letter/s/8491ac/32.png) [@SuperMerabh](https://community.glideapps.com/u/SuperMerabh)
#### Post date: [September 10, 2020, 2:45am UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/13 "2020-09-10T02:45:17Z")

</div>

Thanks @Thomas_Dahm, that must be the worst issue in Glide I’ve found so far. I think Vimeo pro may be a better option, because then I can control what happens at the end of the video, with YouTube it can show me a bunch of crap 😂.

---

<div class="post-metadata">

### Author: ![Thomas\_Dahm](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thomas_dahm/32/142_2.png) [@Thomas\_Dahm](https://community.glideapps.com/u/Thomas_Dahm)
#### Post date: [September 10, 2020, 7:16am UTC](https://community.glideapps.com/t/iphone-locks-while-audio-is-playing-audio-stops/15224/14 "2020-09-10T07:16:14Z")

</div>

yes, indeed vimeo is better.  
This audio issue is because of Apple.

This article gives insight of the problem in general.

> **[What we learned about PWAs and audio playback - Prototyped](https://medium.com/prototyped/what-we-learned-about-pwas-and-audio-playback-10a01c6aecbd)**
>
> A word of advice for any future projects involving PWA — if it has anything to do with media playback, don’t bet on iOS. Think of PWAs as ProblemsWithApple.
