WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
237524
Add a preference to mute video capture in case audio capture gets interrupted
https://bugs.webkit.org/show_bug.cgi?id=237524
Summary
Add a preference to mute video capture in case audio capture gets interrupted
youenn fablet
Reported
2022-03-07 05:30:40 PST
Add a preference to mute video capture in case audio capture gets interrupted
Attachments
Patch
(43.26 KB, patch)
2022-03-07 05:46 PST
,
youenn fablet
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(53.76 KB, patch)
2022-03-07 07:53 PST
,
youenn fablet
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
Patch
(53.76 KB, patch)
2022-03-07 07:59 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(57.44 KB, patch)
2022-03-07 08:13 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch
(49.91 KB, patch)
2022-03-08 00:57 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Patch for landing
(49.93 KB, patch)
2022-03-08 03:07 PST
,
youenn fablet
no flags
Details
Formatted Diff
Diff
Show Obsolete
(5)
View All
Add attachment
proposed patch, testcase, etc.
youenn fablet
Comment 1
2022-03-07 05:31:06 PST
<
rdar://78421282
>
youenn fablet
Comment 2
2022-03-07 05:46:59 PST
Created
attachment 453967
[details]
Patch
Radar WebKit Bug Importer
Comment 3
2022-03-07 06:25:01 PST
<
rdar://problem/89902939
>
youenn fablet
Comment 4
2022-03-07 07:53:54 PST
Created
attachment 453983
[details]
Patch
youenn fablet
Comment 5
2022-03-07 07:59:39 PST
Created
attachment 453985
[details]
Patch
youenn fablet
Comment 6
2022-03-07 08:13:28 PST
Created
attachment 453987
[details]
Patch
youenn fablet
Comment 7
2022-03-07 09:21:14 PST
@philn, I am trying to remove the internals API to interrupt source and use testRunner interruption API which should be closer to how this actually works. The test currently fails in GTK, probably due to MockRealtimeAudioSource::setIsInterrupted being implemented for Cocoa right now. Any idea how this could be implemented for GTK?
Philippe Normand
Comment 8
2022-03-07 09:31:08 PST
(In reply to youenn fablet from
comment #7
)
> @philn, I am trying to remove the internals API to interrupt source and use > testRunner interruption API which should be closer to how this actually > works. > > The test currently fails in GTK, probably due to > MockRealtimeAudioSource::setIsInterrupted being implemented for Cocoa right > now. > Any idea how this could be implemented for GTK?
Humm maybe make it so that MockRealtimeAudioSourceGStreamer::render returns early without notifying samples?
Philippe Normand
Comment 9
2022-03-07 09:31:58 PST
We do implement MockRealtimeAudioSourceGStreamer::setInterruptedForTesting() though.
Philippe Normand
Comment 10
2022-03-07 09:34:22 PST
Comment on
attachment 453987
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=453987&action=review
> Source/WebCore/platform/mediastream/gstreamer/MockRealtimeAudioSourceGStreamer.cpp:-143 > -void MockRealtimeAudioSourceGStreamer::setInterruptedForTesting(bool isInterrupted)
Sorry, didn't read the patch. :D
youenn fablet
Comment 11
2022-03-07 09:41:44 PST
> Humm maybe make it so that MockRealtimeAudioSourceGStreamer::render returns > early without notifying samples?
The main difference is that we are going from an instance method to a static method. Maybe a static variable that MockRealtimeAudioSourceGStreamer::render would use might do the trick?
Philippe Normand
Comment 12
2022-03-07 09:47:33 PST
(In reply to youenn fablet from
comment #11
)
> > Humm maybe make it so that MockRealtimeAudioSourceGStreamer::render returns > > early without notifying samples? > > The main difference is that we are going from an instance method to a static > method. > Maybe a static variable that MockRealtimeAudioSourceGStreamer::render would > use might do the trick?
Yes maybe. Otherwise mark the test as failing and I'll try to fix it later.
Eric Carlson
Comment 13
2022-03-07 11:13:08 PST
Comment on
attachment 453987
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=453987&action=review
r=me once the bots are happy
> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:521 > + if (!source.isEnded() && source.type() == RealtimeMediaSource::Type::Video) > + source.setMuted(isMicrophoneInterrupted);
Shouldn't we also mute screen and window capture during and interruption?
> Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:643 > + if (wasInterrupted != m_isInterrupted && m_private->source().type() == RealtimeMediaSource::Type::Audio && document->settings().muteCameraOnMicrophoneInterruptionEnabled()) > + updateVideoCaptureAccordingMicrophoneInterruption(*document, m_isInterrupted);
Won't this run multiple times if we have more than one audio track?
youenn fablet
Comment 14
2022-03-07 11:40:27 PST
(In reply to Eric Carlson from
comment #13
)
> Comment on
attachment 453987
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=453987&action=review
> > r=me once the bots are happy > > > Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:521 > > + if (!source.isEnded() && source.type() == RealtimeMediaSource::Type::Video) > > + source.setMuted(isMicrophoneInterrupted); > > Shouldn't we also mute screen and window capture during and interruption?
I was not sure about that. Let's continue the discussion on this one.
> > Source/WebCore/Modules/mediastream/MediaStreamTrack.cpp:643 > > + if (wasInterrupted != m_isInterrupted && m_private->source().type() == RealtimeMediaSource::Type::Audio && document->settings().muteCameraOnMicrophoneInterruptionEnabled()) > > + updateVideoCaptureAccordingMicrophoneInterruption(*document, m_isInterrupted); > > Won't this run multiple times if we have more than one audio track?
Yes, it will run once per live microphone track attached to the source. In general, probably only once but it could be more with cloning. That is the downside of using tracks but should have no functional impact visible to users.
youenn fablet
Comment 15
2022-03-07 23:39:45 PST
Given gtk failures, I'll add back the internals API, we should remove it as a follow-up
youenn fablet
Comment 16
2022-03-08 00:57:54 PST
Created
attachment 454081
[details]
Patch
youenn fablet
Comment 17
2022-03-08 03:07:47 PST
Created
attachment 454092
[details]
Patch for landing
EWS
Comment 18
2022-03-08 04:25:37 PST
Committed
r290985
(
248163@main
): <
https://commits.webkit.org/248163@main
> All reviewed patches have been landed. Closing bug and clearing flags on
attachment 454092
[details]
.
Geoffrey Garen
Comment 19
2022-03-08 09:49:11 PST
> > Shouldn't we also mute screen and window capture during and interruption?
> I was not sure about that. > Let's continue the discussion on this one.
FWIW, I tend to agree with the general direction that, if we're going to interrupt, we should interrupt everything. I think that's a simpler mental model for the user, and it matches most UI's I've seen best.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug