fix(SUP-52923): detect AD tracks via manifest NAME when CHARACTERISTICS is absent - #890
Open
inbalvasserman wants to merge 1 commit into
Open
fix(SUP-52923): detect AD tracks via manifest NAME when CHARACTERISTICS is absent#890inbalvasserman wants to merge 1 commit into
inbalvasserman wants to merge 1 commit into
Conversation
…CS is absent Co-Authored-By: Claude <noreply@anthropic.com>
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.
Issue: The SUP-52840 fix (PR #884) introduced
manifestNamethreading and a dedup label pass to handle same-language AD tracks. However, AD detection itself — which setslanguage = "ad-<lang>"to route the track to the AD button — still relied solely on the Kaltura flavoraudio_descriptiontag or the HLSCHARACTERISTICS="public.accessibility.describes-video"attribute. Tracks whose manifestNAMEcontains "Audio Description" but lackCHARACTERISTICSand have no Kaltura flavor metadata were not detected as AD tracks, causing them to appear in the audio selector (music note icon) instead of the dedicated AD button.Root cause:
audioDescriptionTrackHandlerinsrc/track/audio-track.tssetisAudioDescription = trueonly via:audio_description, ortrack.kind === AudioTrackKind.DESCRIPTION(only set whenCHARACTERISTICSis present in the HLS manifest)The
manifestNamefield introduced by PR #884 was available but unused for detection — only used for label deduplication display.Fix: Add a third detection path:
/audio.?desc/i.test(track.manifestName). When the raw HLS manifestNAMEattribute matches this pattern (e.g."Engl - Audio Description","English - Audio Description","Audio Desc"), the track is treated as an AD track. The label guard (!/audio.?desc/i.test(track.label)) already in place prevents double-appending "Audio Description" to the label.This makes both scenarios work correctly:
NAME="Engl - Audio Description", noCHARACTERISTICS→ AD button shows (was: music icon)NAME="English"/NAME="English - Audio Description"→ distinct labels + AD button (preserved)SUP-52923