Skip to content

[WEBVTT] Added support to X-TIMESTAMP-MAP HLS header#35

Open
alexandercerutti wants to merge 8 commits into
developfrom
feature/webvtt/x-timestamp-map
Open

[WEBVTT] Added support to X-TIMESTAMP-MAP HLS header#35
alexandercerutti wants to merge 8 commits into
developfrom
feature/webvtt/x-timestamp-map

Conversation

@alexandercerutti

Copy link
Copy Markdown
Owner

Closes #34

@vercel

vercel Bot commented Jul 11, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sub37-sample Ready Ready Preview, Comment Jul 12, 2026 4:48pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds initial support for HLS X-TIMESTAMP-MAP in webvtt-adapter by parsing the header and rebasing cue timestamps, plus expands test coverage for BOM + timestamp-map behavior.

Changes:

  • Parses X-TIMESTAMP-MAP from the WEBVTT header and applies an offsetMs to cue start/end times.
  • Extends InvalidFormatError reason codes to include invalid X-TIMESTAMP-MAP.
  • Adds Jest specs covering BOM handling and multiple X-TIMESTAMP-MAP scenarios.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 10 comments.

File Description
packages/webvtt-adapter/src/InvalidFormatError.ts Adds a new reason code for invalid X-TIMESTAMP-MAP.
packages/webvtt-adapter/src/Adapter.ts Implements header parsing for X-TIMESTAMP-MAP and applies a cue time offset.
packages/webvtt-adapter/specs/Adapter.spec.mjs Adds tests for BOM and X-TIMESTAMP-MAP rebasing cases.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/webvtt-adapter/src/Adapter.ts Outdated
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/src/Adapter.ts Outdated
Comment thread packages/webvtt-adapter/src/Adapter.ts
Comment thread packages/webvtt-adapter/specs/Adapter.spec.mjs
Comment thread packages/webvtt-adapter/specs/Adapter.spec.mjs

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread packages/webvtt-adapter/src/Adapter.ts Outdated
Comment thread packages/webvtt-adapter/src/Adapter.ts
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[WEBVTT] Start supporting HLS X-TIMESTAMP-MAP

2 participants