Potential Issue with Locale-Sensitive Track Label Checks
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
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?