w3c / system-wake-lock

System Wake Lock API
Other
3 stars 2 forks source link

Use case: playback of a list of audio tracks #14

Open leonixyz opened 1 year ago

leonixyz commented 1 year ago

I was currently fiddling with <AUDIO> by hooking into its ended event and dynamically changing its src attribute to be able to achieve an "audio playlist" functionality. While it works perfectly on any desktop UA, on mobile the playback stops in between tracks once the screen is locked, or the application is put in background.

Acquiring a screen wake lock is way beyond the needs for an audio player, but from my understanding it could solve the problem.

If I understand correctly, this could be a use case for the system wake lock. If not so, please accept my apologies and could anyone be so kind to point me to some other resource that might help me solving this problem?

Thanks in advance.