fix(portals): treat an undetermined audio language as unknown (#1689)

* fix(portals): treat an undetermined audio language as unknown

ICU 78, which Electron 43 and Node 26 ship, canonicalizes the ffprobe
marker `und` to the subtag `und` instead of an empty one. The source
metadata then recorded it as a stated language, so a switch between a
copy tagged `und` and one tagged English raised the "dub may differ"
warning. CI's older ICU hid this: the existing spec only fails on the
newer runtime.

Decline `und` explicitly, and cover `und-US` plus the dub comparison.

* test(portals): cover undetermined language across runtimes

---------

Co-authored-by: 4gray <serega05@gmail.com>
This commit is contained in:
Mahmut YUMand4gray authored and GitHub committed 2026-10-01 06:24:20 +02:00
1 parent 444ec06e94
commit 1dba959852
4 files changed
+67 -4

No files matched your search

+5
View File
@@ -776,6 +776,11 @@ tag a language at all, so in practice it is usually silent — which is the
honest state, and the same one the rest of this feature takes when it does not
know.
Undetermined language tags (`und`, including regional forms such as `und-US`)
are explicitly treated as unknown after normalization. This must hold whether
the runtime's `Intl.Locale` returns no language or preserves `und`: neither
case establishes a factual dub difference against a known language.
Switching sources through `startResolvedPlayback` closes the external session
it LAUNCHED first — tracked separately so refreshes and overlapping handoffs
cannot disown it within the same route session. The retained identity is ignored