feat(subtitles): HBO Max official bilingual subtitles — 2nd adapter on the streaming framework - #1
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1b97d046ef
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (!offsetMs || !fragments.length || fragments[0].start + 5_000 >= offsetMs) | ||
| return fragments |
There was a problem hiding this comment.
Apply DASH offsets to relative WebVTT segments
For DASH tracks whose WebVTT segment cues are relative to the segment, this guard skips applying the segment offset whenever the offset is less than 5s (or the first local cue starts near the segment offset). The parser in this commit commonly produces early segmentStartMs values such as 1000/2000ms, so those segments would all render near 0s instead of their DASH timeline positions, breaking subtitle timing and bilingual alignment for segmented HBO tracks. The relative/absolute check needs to distinguish absolute cue timestamps without dropping valid relative offsets.
Useful? React with 👍 / 👎.
Second adapter on the streaming subtitle framework from the Netflix PR, proving it generalizes beyond one site: - hbo-max adapter + minimal DASH MPD parser for HBO's segmented WebVTT subtitles. - Extends the MAIN-world interceptor to capture HBO's .vtt / .mpd responses and the content-script bootstrap to non-/watch/ players. - Reuses the shared source/target selection + bilingual alignment unchanged. Stacks on the Netflix framework PR; diff here is only the HBO delta.
1b97d04 to
b1470c1
Compare
HBO Max / Max — second adapter on the streaming framework
Stacks on mengxi-ream#1757 (the framework PR). This is the proof the adapter design generalizes: adding HBO Max is a +386-line delta that reuses the shared capture → source/target selection → bilingual alignment pipeline unchanged.
hbo-maxadapter + a minimal DASH MPD parser for HBO's segmented WebVTT subtitles.vtt/.mpdresponses, and the content-script bootstrap to non-/watch/playersStreamingSiteAdapter, sameStreamingSubtitlesFetcher, same registry — no new plumbingIts base is the Netflix framework branch, so this diff is only the HBO delta and stays under the 1000-line new-contributor threshold. Once mengxi-ream#1757 merges into
main, this reopens againstmengxi-ream:mainas a clean ~386-line PR.Tests