Bug 220960 - Mute audio capture for speech recognition based on shouldInterruptAudioOnPageVisibilityChange when page is invisible
Summary: Mute audio capture for speech recognition based on shouldInterruptAudioOnPage...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sihui Liu
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-01-25 17:18 PST by Sihui Liu
Modified: 2021-01-26 22:32 PST (History)
3 users (show)

See Also:


Attachments
Patch (8.21 KB, patch)
2021-01-25 17:30 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (7.63 KB, patch)
2021-01-25 17:31 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (10.58 KB, patch)
2021-01-26 00:18 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (7.67 KB, patch)
2021-01-26 09:45 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (7.99 KB, patch)
2021-01-26 15:24 PST, Sihui Liu
no flags Details | Formatted Diff | Diff
Patch (10.26 KB, patch)
2021-01-26 20:54 PST, Sihui Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sihui Liu 2021-01-25 17:18:41 PST
...
Comment 1 Sihui Liu 2021-01-25 17:30:12 PST
Created attachment 418360 [details]
Patch
Comment 2 Sihui Liu 2021-01-25 17:31:18 PST
Created attachment 418361 [details]
Patch
Comment 3 Stephan Szabo 2021-01-25 18:58:12 PST
Comment on attachment 418361 [details]
Patch

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

> Source/WebKit/UIProcess/WebProcessProxy.cpp:1793
> +    if (!RealtimeMediaSourceCenter::shouldInterruptAudioOnPageVisibilityChange())

This seems like it may need to be in at least a #if ENABLE(MEDIA_STREAM) since RealtimeMediaSourceCenter.h uses one around the whole body.
Comment 4 Sihui Liu 2021-01-26 00:18:28 PST
Created attachment 418376 [details]
Patch
Comment 5 youenn fablet 2021-01-26 00:35:14 PST
Comment on attachment 418376 [details]
Patch

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

> Source/WebKit/UIProcess/SpeechRecognitionPermissionManager.cpp:166
> +        m_suspended = true;

Do we really need that change?
It moves away from being able to apply user gesture constraint to this API, which seems desirable given this asks for microphone and can prompt the user.
Comment 6 Sihui Liu 2021-01-26 09:45:36 PST
Created attachment 418432 [details]
Patch
Comment 7 Sihui Liu 2021-01-26 15:24:42 PST
Created attachment 418479 [details]
Patch
Comment 8 Sihui Liu 2021-01-26 20:54:18 PST
Created attachment 418502 [details]
Patch
Comment 9 EWS 2021-01-26 22:31:11 PST
Committed r271935: <https://trac.webkit.org/changeset/271935>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 418502 [details].
Comment 10 Radar WebKit Bug Importer 2021-01-26 22:32:12 PST
<rdar://problem/73648946>