Closed steinbro closed 5 months ago
I think another feasible solution is to use the Screen Wake Lock API , which seems to be supported by most common browsers, including iOS Safari Unfortunately, it does look like it won't work on iOS Safari if the user has the site installed as a home screen web app. If that's not an acceptable caveat, then the best workaround would be to have a silently repeating audio/video in the background, as you suggested. Either way, I can get started on this.
Thanks for the insight! I was not familiar with the Screen Web Lock API. That looks like the most straightforward and appropriate way to accomplish this, so I'd certainly welcome that implementation.
Since the Soundscape web app doesn't need much interaction, the device tends to auto-lock even when the app is open and active. At least on iOS Safari, my understanding is that geolocation updates aren't reported to websites while the device is locked. Thus, callouts are stopped prematurely.
Is there a way to keep the screen on when a callout mode is enabled, e.g. by pretending that a video is playing?