Bug 239927 - Web audio stop working after leaving the web page/app for some time
Summary: Web audio stop working after leaving the web page/app for some time
Status: RESOLVED DUPLICATE of bug 237654
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: Safari 15
Hardware: Unspecified Unspecified
: P2 Major
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-04-30 06:13 PDT by renduser
Modified: 2022-06-23 16:53 PDT (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description renduser 2022-04-30 06:13:45 PDT
I think same as:

https://stackoverflow.com/questions/69502340/ios-15-web-audio-playback-stops-working-in-safari-after-locking-screen-for-a-fe


Initially web audio works using tap sound on interaction. After some time left alone and I revisit the open web app there is no sound any more.

As well it seem inconsistent when changing apps it sometime works, and sometime stops working, or if it is some kind of time limit even though the phone is on, with unlocked screen.

This bug is not about playing backgroud audio, but sound on user interactions.
Comment 1 youenn fablet 2022-05-02 23:58:31 PDT
Could it be the AudioSession being suspended after a few minutes of inactivity?
In that case, this might be fixed by https://bugs.webkit.org/show_bug.cgi?id=237654.

@renduser, could you reproduce the issue and send me a sysdiagnose (youenn@apple.com)?
Or give a precise repro case. For instance, would the following allow you to reproduce:
- open https://airhorner.com, validate sound can be triggered.
- wait some time
- validate sound cannot be triggered.
Comment 2 renduser 2022-05-03 04:26:19 PDT
Yes your example reproduces the issue. No sound after some time of inactivity i.e. screen lock, or doing other things with the screen still on and returning to it later.

Calling resume() on every sound checking if "suspended" or "interrupted" doesn't help.

Version iOS 15.4.1
Comment 3 Radar WebKit Bug Importer 2022-05-07 06:14:12 PDT
<rdar://problem/92906510>
Comment 4 Brent Fulgham 2022-06-23 16:53:30 PDT
Committed r291268 (248417@main): <https://commits.webkit.org/248417@main>

*** This bug has been marked as a duplicate of bug 237654 ***