Bug 237654 - Make sure to end any pending AudioSession interruption when activating it
Summary: Make sure to end any pending AudioSession interruption when activating it
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Media (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
: 237653 239927 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-03-09 06:44 PST by youenn fablet
Modified: 2022-06-23 16:53 PDT (History)
8 users (show)

See Also:


Attachments
Patch (8.32 KB, patch)
2022-03-09 06:50 PST, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2022-03-09 06:44:44 PST
Make sure to end any pending AudioSession interruption when activating it
Comment 1 youenn fablet 2022-03-09 06:45:04 PST
<rdar://88405081>
Comment 2 youenn fablet 2022-03-09 06:50:14 PST
Created attachment 454233 [details]
Patch
Comment 3 youenn fablet 2022-03-09 07:00:31 PST
This solves the reported issue but does not solve the general problem.
Say we do the following:
- capture microphone (which activates the audio session), then stop capture microphone (without deactivating the audio session since we would have a remaining element).
- receive the interruption from AudioSession after a few minutes
- capture camera and try to autoplay it.
It would fail (until we for instance capture microphone again).

Maybe we should do some additional things like:
- Deactivate the audio session when we are doing nothing with it (which will remove the interruption in most cases).
- Add special treatment to AudioSession interruptions. It seems odd that muted video would not autoplay due to an AudioSession ongoing interruption.
Comment 4 youenn fablet 2022-03-09 08:52:25 PST
*** Bug 237653 has been marked as a duplicate of this bug. ***
Comment 5 EWS 2022-03-15 00:29:56 PDT
Committed r291268 (248417@main): <https://commits.webkit.org/248417@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 454233 [details].
Comment 6 Brent Fulgham 2022-06-23 16:53:30 PDT
*** Bug 239927 has been marked as a duplicate of this bug. ***