Bug 1963163 - Don't prime voice processing when requesting fake audio. r=padenot a=RyanVM

Original Revision: https://phabricator.services.mozilla.com/D260843

Differential Revision: https://phabricator.services.mozilla.com/D261078
This commit is contained in:
Andreas Pehrson
2025-08-13 11:07:15 +00:00
committed by rvandermeulen@mozilla.com
parent c6201d9f7a
commit b0feaebde8

View File

@@ -3162,8 +3162,8 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
GetCurrentSerialEventTarget(), __func__,
[self, windowID, c, windowListener, placeholderListener, hasAudio,
hasVideo, askPermission, prefs, isSecure, isHandlingUserInput,
callID, principalInfo, aCallerType, resistFingerprinting,
audioType](RefPtr<LocalMediaDeviceSetRefCnt> aDevices) mutable {
callID, principalInfo, aCallerType, resistFingerprinting, audioType,
forceFakes](RefPtr<LocalMediaDeviceSetRefCnt> aDevices) mutable {
LOG("GetUserMedia: starting post enumeration promise2 success "
"callback!");
@@ -3226,6 +3226,10 @@ RefPtr<MediaManager::StreamPromise> MediaManager::GetUserMedia(
// It is time to ask for user permission, prime voice processing
// now. Use a local lambda to enable a guard pattern.
[&] {
if (forceFakes) {
return;
}
if (audioType != MediaSourceEnum::Microphone) {
return;
}