[webkit-changes] [WebKit/WebKit] 192b7a: MediaSession.setMicrophoneActive(true) is promptin...

youennf noreply at github.com
Fri Sep 27 17:27:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 192b7af2b1385c1878d0f9d94f0aa3a7d43e2e72
      https://github.com/WebKit/WebKit/commit/192b7af2b1385c1878d0f9d94f0aa3a7d43e2e72
  Author: Youenn Fablet <youenn at apple.com>
  Date:   2024-09-27 (Fri, 27 Sep 2024)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp
    M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h
    M Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm
    M Source/WebKit/UIProcess/WebPageProxy.cpp

  Log Message:
  -----------
  MediaSession.setMicrophoneActive(true) is prompting repeatedly if microphone was muted by the UA once
rdar://135941062
https://bugs.webkit.org/show_bug.cgi?id=279658

Reviewed by Eric Carlson.

When web page is muting, it notified CoreAudioSharedUnit which can then send back an AirPod muted notification.
This triggers the fact that, even though web page decided to be muted, we know think that the user decided to mute.
When web page tries to unmute, user is then prompted.

We update CoreAudioSharedUnit to only send back muted notifications when isMuting is not aligned with isProducingMicrophoneSamples().

We will be able to test this with some refactoring in the way we mock audio capture.
A follow-up patch will do this testing refactoring and improvement.

* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.cpp:
(WebCore::CoreAudioSharedUnit::isProducingMicrophoneSamplesChanged):
(WebCore::CoreAudioSharedUnit::handleMuteStatusChangedNotification):
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.h:
* Source/WebCore/platform/mediastream/mac/CoreAudioSharedUnit.mm:
(WebCore::CoreAudioSharedUnit::setMutedState):
* Source/WebKit/UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::microphoneMuteStatusChanged):

Canonical link: https://commits.webkit.org/284399@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list