Skip to content

Fix issue on Android WebView where there is no default audio device#5900

Merged
JamesBurnside merged 3 commits intomainfrom
jaburnsi/fix-android-webview-missing-label
Jun 17, 2025
Merged

Fix issue on Android WebView where there is no default audio device#5900
JamesBurnside merged 3 commits intomainfrom
jaburnsi/fix-android-webview-missing-label

Conversation

@JamesBurnside
Copy link
Copy Markdown
Member

@JamesBurnside JamesBurnside commented Jun 13, 2025

What

For config page and for call page, ensure we use a default fallback for the device name for microphone if the default microphone does not have one.

Why

Fix issue on Android WebView where there is no default audio device. The default audio device on android webview has no label:

image

How Tested

Verified on android web view and verified usePropsFor on devicesbutton on macos safari

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 13, 2025

@azure/communication-react jest test coverage for stable.

Lines Statements Functions Branches
Base 29587 / 47224
62.65%
29587 / 47224
62.65%
816 / 1492
54.69%
2428 / 3851
63.04%
Current 29614 / 47246
62.68%
29614 / 47246
62.68%
816 / 1492
54.69%
2420 / 3851
62.84%
Diff 27 / 22
0.03%
27 / 22
0.03%
0 / 0
0%
-8 / 0
-0.2%

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 13, 2025

@azure/communication-react jest test coverage for beta.

Lines Statements Functions Branches
Base 58379 / 94795
61.58%
58379 / 94795
61.58%
1187 / 2716
43.7%
3375 / 5769
58.5%
Current 58323 / 94855
61.48%
58323 / 94855
61.48%
1187 / 2716
43.7%
3382 / 5769
58.62%
Diff -56 / 60
-0.1%
-56 / 60
-0.1%
0 / 0
0%
7 / 0
0.12%

}
);

function removeBlankNameDevices<T extends { name: string }>(devices: T[]): T[] {
Copy link
Copy Markdown
Member Author

@JamesBurnside JamesBurnside Jun 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have verified removing this does not cause any regression on macas safari with usePropsFor and devices button

[getDeviceManager],
(deviceManager) => {
return {
microphones: removeBlankNameDevices(deviceManager.microphones),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are the blank name devices coming only from webview, do we need to filter any other devices that might cause issue?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Validated the scenario with donald that removeBlankNameDevices was applied for and it no longer repros, but if we see regressions we can look at other solution. It was originally added here #2366 as a workaround where the SDK was putting in a fake camera when there wasn't camera permission - but its not reproing any longer (this was back in 2022)

@JamesBurnside JamesBurnside enabled auto-merge (squash) June 17, 2025 18:57
@JamesBurnside JamesBurnside added does not need changelog Changes that does not affect the published package in any way do not need changelog entry and removed does not need changelog Changes that does not affect the published package in any way do not need changelog entry labels Jun 17, 2025
@github-actions
Copy link
Copy Markdown
Contributor

📦 Calling bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 5826143 5827276 ⚠️ increased 1133
398.bundle.js 12413560 12413560 ➖ unchanged 0

Total change: +1.1 KB ⚠️

@github-actions
Copy link
Copy Markdown
Contributor

📦 CallWithChat bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 6801388 6802521 ⚠️ increased 1133
398.bundle.js 12413574 12413574 ➖ unchanged 0
399.bundle.js 362421 362421 ➖ unchanged 0
450.bundle.js 4471 4471 ➖ unchanged 0
82.bundle.js 28319 28319 ➖ unchanged 0
91.bundle.js 4071 4071 ➖ unchanged 0

Total change: +1.1 KB ⚠️

@github-actions
Copy link
Copy Markdown
Contributor

📦 Chat bundle size

Bundle Base Size (bytes) Current Size (bytes) Change Delta (bytes)
build.bundle.js 1779367 1779453 ⚠️ increased 86
110.bundle.js 365689 365689 ➖ unchanged 0
450.bundle.js 4455 4455 ➖ unchanged 0
82.bundle.js 28303 28303 ➖ unchanged 0
91.bundle.js 4055 4055 ➖ unchanged 0

Total change: +86 B ⚠️

@JamesBurnside JamesBurnside merged commit 1a74fe6 into main Jun 17, 2025
139 of 162 checks passed
@JamesBurnside JamesBurnside deleted the jaburnsi/fix-android-webview-missing-label branch June 17, 2025 19:14
JamesBurnside added a commit that referenced this pull request Jun 18, 2025
…5900)

* Fix issue on Android WebView where there is no default audio device

* Change files

* updatge api files
JamesBurnside added a commit that referenced this pull request Jun 18, 2025
…5900)

* Fix issue on Android WebView where there is no default audio device

* Change files

* updatge api files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants