Skip to content

fix(SUP-52923): detect AD tracks via manifest NAME when CHARACTERISTICS is absent - #890

Open
inbalvasserman wants to merge 1 commit into
masterfrom
fix/SUP-52923-manifest-name-ad-detection
Open

fix(SUP-52923): detect AD tracks via manifest NAME when CHARACTERISTICS is absent#890
inbalvasserman wants to merge 1 commit into
masterfrom
fix/SUP-52923-manifest-name-ad-detection

Conversation

@inbalvasserman

@inbalvasserman inbalvasserman commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Issue: The SUP-52840 fix (PR #884) introduced manifestName threading and a dedup label pass to handle same-language AD tracks. However, AD detection itself — which sets language = "ad-<lang>" to route the track to the AD button — still relied solely on the Kaltura flavor audio_description tag or the HLS CHARACTERISTICS="public.accessibility.describes-video" attribute. Tracks whose manifest NAME contains "Audio Description" but lack CHARACTERISTICS and 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: audioDescriptionTrackHandler in src/track/audio-track.ts set isAudioDescription = true only via:

  1. Kaltura flavor asset tag audio_description, or
  2. track.kind === AudioTrackKind.DESCRIPTION (only set when CHARACTERISTICS is present in the HLS manifest)

The manifestName field 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 manifest NAME attribute 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:

  • SUP-52923: NAME="Engl - Audio Description", no CHARACTERISTICS → AD button shows (was: music icon)
  • SUP-52840: duplicate NAME="English" / NAME="English - Audio Description" → distinct labels + AD button (preserved)

SUP-52923

…CS is absent

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant