Skip to content

Add an audio description toggle to mave-player - #143

Open
bluebird42 wants to merge 2 commits into
mainfrom
audio-description
Open

bluebird42 wants to merge 2 commits into
mainfrom
audio-description

Conversation

@bluebird42

@bluebird42 bluebird42 commented Nov 1, 2026 •

Copy link
Copy Markdown
Contributor

What

Core can now publish audio descriptions (maveio/core#39): per language a full-mix MP3 with spoken descriptions, as an HLS alternate audio rendition marked CHARACTERISTICS="public.accessibility.describes-video", and a descriptions WebVTT, listed in a new manifest key:

"audio_descriptions": [
  {"language": "nl", "label": "Dutch (audio description)",
   "audio": {"path": "…/audio_description_nl.mp3", "hls_playlist": "audio_description_nl_hls/playlist.m3u8"},
   "vtt": {"path": "…/descriptions_nl.vtt"}}
]

This PR lets mave-player play them:

  • AD button (src/components/audio-description-button.ts) in the control bar, with aria-pressed. On switches to the describes-video audio track in the current audio language (falling back to video.language, then en); off goes back to the previous track. The choice is remembered per viewer.
  • audiodescription attribute: auto (default: shown when the manifest has audio descriptions and playback is HLS), on, off. Not shown for MP4-only playback.
  • Descriptions track: each VTT is added as a hidden <track kind="descriptions">, for assistive technology, and stays out of the captions menu.
  • Placement in the default and dolphin themes; strings localized.
  • Embed.audio_descriptions type in src/embed/api.ts.
  • Example: examples/audio-description.html with a small local HLS fixture.

Manifests without audio_descriptions behave exactly as before.

Verified

  • npm run ts-types and npm run build pass. npm run lint reports no new errors (the changed files had the same count before).
  • In the browser with HLS.js: the button shows, toggling switches between the original and the describes-video track both ways, and the descriptions track is present but not in the captions menu.
  • Not yet tested with Safari's native HLS.

When the manifest lists audio_descriptions, HLS playback shows an AD button
that switches to the audio rendition marked
public.accessibility.describes-video in the current language and back. The
choice is remembered per viewer. The descriptions WebVTT is added as a hidden
kind="descriptions" track and stays out of the captions menu. A new
audiodescription attribute (auto, on, off) controls the button.

Includes a local HLS example under examples/audio-description.html.
Replace the separate AD toggle with the existing audio track selector.
Support optional descriptive WebVTT and retain the live HLS audio track
count. Keep the current main-branch subtitle fixes and package version.

This branch has not been deployed

No deployments
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