Firefox, Google Chrome, Telegram... Whenever I start playing web audio in an app that is not Safari and then lock the screen, playback invariably terminates after 20 seconds. This happens with various audio sources, including web radio and video. The same sources work fine in Safari with a locked screen.

I find it very hard to accept that this would be intended behavior. It makes every other browser eventually unusable since they're not fit for basic tasks, like streaming music.

What's going on? Why does it behave like this?

iPhone 8, iOS 13

  • Not sure, but I've never had this problem myself with any apps (including streaming video/music apps, radio, etc). I don't use Chrome or Firefox, but if I play anything through Safari, I have the desktop site version playing in order to have it playing in the background. Occasionally when Safari is running in the background it would pause the audio, but a simple swipe into the control centre and pressing play allows the audio to continue in the background, including when the screen is locked. – AVelj Dec 6 '20 at 11:04
  • @AVelj Thanks for commenting. I'm specifically talking about web content, on a website in a web view, i.e. not just any apps that happen to stream and play audio. – Andreas Dec 6 '20 at 11:50
  • ah fair enough. They should all be using the same web engines in iOS (webkit), but I'm not sure how this all works to be honest – AVelj Dec 6 '20 at 11:55
  • @AVelj Yeah, that's why I expected all apps to get the same behavior for free. Strange... Regarding your workaround for playing YouTube in the background in Safari, I've found that it often works best after pinching out of full screen video before backgrounding Safari. (I investigated using Shortcuts to overwrite the JS hooks used to detect backgrounding, but it isn't possible) – Andreas Dec 6 '20 at 12:04
  • You can run Youtube in the background in Safari by running it as the desktop site version. The moment you leave safari, go into control centre and press play. It will then continue to play in the background. This trick doesn't work with mobile site version of Youtube, but in iOS 14 (but not iOS 13), I think the mobile site works with PiP mode, which makes playing in the background easier – AVelj Dec 6 '20 at 12:09

You must log in to answer this question.

Browse other questions tagged .