Skip to content

Conversation

@Sourojitbanerjee
Copy link

Description

Fixes WebVTT caption parsing when X-TIMESTAMP-MAP contains large MPEGTS values (e.g., 183600). Previously, the parser would throw "Malformed WebVTT signature" errors and fail to load captions.

Problem

When WebVTT files contain X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:183600, the parser rejects them as malformed, preventing caption display. This is common with videos processed by Elemental Media Engine and other video processing tools.

Steps to Reproduce

  1. Load HLS stream with WebVTT captions containing large MPEGTS values
  2. Enable captions
  3. Observe "Malformed WebVTT signature" error in console and missing captions

Solution

  • Modified WebVTT parser to handle larger MPEGTS values gracefully
  • Added normalization for extremely large timestamp values while maintaining standards compliance
  • Maintains backward compatibility with standard MPEGTS values

Testing

@welcome
Copy link

welcome bot commented Oct 22, 2025

💖 Thanks for opening this pull request! 💖

Things that will help get your PR across the finish line:

  • Run npm run lint -- --errors locally to catch formatting errors earlier.
  • Include tests when adding/changing behavior.
  • Include screenshots and animated GIFs whenever possible.

We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can.

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.

1 participant