Skip to content

fix: silence original audio unavailable toast on single-language streams - #33

Merged
Priveetee merged 3 commits into
TypeType-Video:devfrom
Aquarius-Situla:fix/silence-single-language-original-audio-toast
Sep 26, 2026
Merged

Priveetee merged 3 commits into
TypeType-Video:devfrom
Aquarius-Situla:fix/silence-single-language-original-audio-toast

Conversation

@Aquarius-Situla

Copy link
Copy Markdown
Contributor

What changed

In PlayerDefaults (apps/web/src/components/player-defaults.tsx):

  • Added a hasMultipleLanguages check using normalized audio track language tags.
  • Guarded missingOriginalByHeuristic and the onOriginalLanguageUnavailable?.() notification with hasMultipleLanguages.

Why the change is needed

For video providers or streams that only provide a single language track (or where multiple bitrate streams of the same audio track do not carry distinct language or "original" flags, such as Bilibili DASH streams), originalAudioTrackId is undefined and heuristic language matching fails to find an explicit "original" match.

Currently, this causes missingOriginalByHeuristic to evaluate to true, repeatedly triggering the Original audio unavailable toast notification upon video load, even though there are no alternate language tracks for the video.

With this change, the missing original audio notification only fires when the media actually has multiple distinct language audio options available but fails to match the original track.

Which issue it addresses

Addresses the false-positive "Original audio unavailable" notification on single-language streams (relates to BiliBili DASH streams in #287).

How it was tested

  • Tested on self-hosted instances with Bilibili DASH streams (containing 3 audio bitrate representations in a single language); verified that the Original audio unavailable toast no longer triggers.
  • Verified that multi-language audio streams with multiple distinct language tracks continue to notify users when their preferred original language track cannot be found.

Whether another TypeType component must change with it

No other changes required.

@Priveetee

Copy link
Copy Markdown
Member

LGTM 😉

@Priveetee
Priveetee merged commit 83fc64e into TypeType-Video:dev Sep 26, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants