components-js icon indicating copy to clipboard operation
components-js copied to clipboard

Potential Issue with Locale-Sensitive Track Label Checks

Open lebaudantoine opened this issue 5 months ago • 1 comments

Select which package(s) are affected

@livekit/components-core

Describe the bug

In mediaDeviceSelect.ts, there are several checks that rely on whether the media track label starts with "Default". However, these labels are locale-dependent and may appear in different languages based on the user's system settings. This makes such checks unreliable across different locales. I'm not sure I fully understand the purpose of this logic, could you clarify the intent behind it?

Reproduction

Set your browser in any other language than English, and console log a local track label.

Logs


System Info

MacOs, Chrome

Severity

annoyance

Additional Information

No response

lebaudantoine avatar Jul 28 '25 22:07 lebaudantoine

the "default" parsing is a best-effort approach that shouldn't be required.

Totally agree that this falls short for other languages, but I also cannot think of a way how to address this consistently for all languages/locales.

Do you have a suggestion?

lukasIO avatar Sep 22 '25 12:09 lukasIO