Bug 230538 - [IOS 15] Video track does not get unmuted in case of tab was inactive less than ~500 ms
Summary: [IOS 15] Video track does not get unmuted in case of tab was inactive less th...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Other
Hardware: iPhone / iPad Unspecified
: P2 Critical
Assignee: youenn fablet
URL:
Keywords: InRadar
: 230698 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-09-21 01:37 PDT by olena.bezkrovna
Modified: 2021-10-13 10:52 PDT (History)
12 users (show)

See Also:


Attachments
Patch (30.06 KB, patch)
2021-09-23 12:31 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Patch for landing (30.17 KB, patch)
2021-09-23 22:52 PDT, youenn fablet
no flags Details | Formatted Diff | Diff
Fix potential test flakiness (30.21 KB, patch)
2021-09-23 23:53 PDT, 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 olena.bezkrovna 2021-09-21 01:37:50 PDT
Steps:
1. Start video
2. Put to the background and back to foreground right away or switch to a different tab and return

Actual result: Video is not restarted, also visibilitychange event is not fired
Issue is not reproducible on IOS 14.7
Can be tested on WebRTC sample - https://webrtc.github.io/samples/src/content/getusermedia/gum/
Comment 1 Radar WebKit Bug Importer 2021-09-21 09:42:10 PDT
<rdar://problem/83355705>
Comment 2 Alexey Proskuryakov 2021-09-21 09:44:52 PDT
> visibilitychange event is not fired

This seems like it would have an even broader impact.
Comment 3 youenn fablet 2021-09-23 06:47:32 PDT
I can reproduce as well, this seems like a fallout of moving to GPUProcess.
We should probably notify muted state when getting interrupted from GPUProcess, instead of muting the source (which stops the underlying source and ends up removing the possibility to be notified of the unsuspension).
Comment 4 youenn fablet 2021-09-23 12:31:26 PDT
Created attachment 439081 [details]
Patch
Comment 5 Eric Carlson 2021-09-23 13:21:57 PDT
Comment on attachment 439081 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=439081&action=review

> Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:386
> +    undefined setMockCameraInterruption(boolean isInterrupted);

Nit: I think the would be better as `setMockCameraIsInterrupted`.
Comment 6 youenn fablet 2021-09-23 22:52:05 PDT
Created attachment 439125 [details]
Patch for landing
Comment 7 youenn fablet 2021-09-23 23:53:50 PDT
Created attachment 439130 [details]
Fix potential test flakiness
Comment 8 EWS 2021-09-24 02:39:24 PDT
Committed r283033 (242093@main): <https://commits.webkit.org/242093@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439130 [details].
Comment 9 youenn fablet 2021-09-29 02:28:31 PDT
*** Bug 230698 has been marked as a duplicate of this bug. ***
Comment 10 Joel Udwin 2021-10-13 10:52:48 PDT
Just tested the repro steps on iOS 15.1 beta 4 and still encountered the issue. Was this expected to be fixed in this release?