PWA play media in background
Asked Answered
P

1

8

I have an idea to build a simple mobile website that can play music when minimized or even when the phone is locked. I know support for this is limited, so was wondering, is a PWA a solution for this? I can’t find much documentation about the support of a PWA play media in the background. So does anyone know if this is even possible on Android and iOS, or where i can find more info about this?

Thanks in advance!

Predigestion answered 1/12, 2018 at 10:43 Comment(2)
Hey! Just curious what your final solution was for this? Did you go with a native wrapper like Cordova?Histaminase
Is it possible in 2020?Exine
D
4

In Safari on iOS, the audio will pause if (A) the screensaver kicks in, (B) the app is minimized, or (C) the user temporarily switches to another app. To mitigate the problem in this particular use case, you might need to wrap the app in Cordova, and combine Cordova with a plugin, such as this one: https://thecodebeast.com/post/cordova-allow-audio-to-play-in-background-and-in-silent-switch/72

Dainedainty answered 1/12, 2018 at 15:40 Comment(2)
Thank you for the info. Using Cordova sounds like a good solution. I will give it a try!Predigestion
But it will be native application in this case but not a web application anymore. So you will need AppStore and GooglePlay accountSavannasavannah

© 2022 - 2024 — McMap. All rights reserved.