fix: silence original audio unavailable toast on single-language streams - #33
Merged
Priveetee merged 3 commits intoSep 26, 2026
Conversation
Member
|
LGTM 😉 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
In
PlayerDefaults(apps/web/src/components/player-defaults.tsx):hasMultipleLanguagescheck using normalized audio track language tags.missingOriginalByHeuristicand theonOriginalLanguageUnavailable?.()notification withhasMultipleLanguages.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),
originalAudioTrackIdis undefined and heuristic language matching fails to find an explicit "original" match.Currently, this causes
missingOriginalByHeuristicto evaluate totrue, repeatedly triggering theOriginal audio unavailabletoast 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
Original audio unavailabletoast no longer triggers.Whether another TypeType component must change with it
No other changes required.