feat(subtitles): add Netflix streaming subtitle adapter - #1758
feat(subtitles): add Netflix streaming subtitle adapter#1758semantic-craft wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: a29782b The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor trust score16/100 — New contributor This score estimates contributor familiarity with Outcome
Score breakdown
Signals used
Policy
Updated automatically when the PR changes or when a maintainer reruns the workflow. |
|
@taiiiyang will review your PR in the future, but he's busy recently, so may take time |
|
This PR has been inactive for 14 days and is now marked as stale. |
|
This PR has been inactive for 14 days and is now marked as stale. |
Type of Changes
Description
This PR adds a small Netflix-first streaming subtitle adapter for Read Frog.
The earlier official-subtitle PRs (#1749 and #1751) explored official Chinese subtitle + official English subtitle comparison. That remains the direction I would like to support later, but keeping that full official-track alignment path under the 1000-line contributor threshold makes the implementation too compressed to preserve the feature well.
This PR therefore ships the smaller and repeatedly locally tested path first: keep the streaming player in charge of native captions, switch Netflix to an English caption track in the page world, capture the player-rendered English cue, and feed that source text through Read Frog's existing translation pipeline and overlay. The user-facing model is similar to Immersive Translate: official/player-rendered source text plus generated Chinese translation.
The implementation is still structured as a generic streaming adapter, not a Netflix-only one-off:
StreamingSiteAdapterdescribes site matching, track discovery, and optional live cue capture.StreamingSubtitlesFetcherbridges those adapters into the existing subtitles fetcher contract.UniversalVideoAdapteraccepts live-capture-only subtitle sources and merges cue updates into the existing scheduler.To our knowledge, this is currently one of the only openly available implementations of this practical streaming-caption model in an open-source browser extension. The same adapter shape has also been repeatedly tested locally on HBO Max, but HBO Max support is intentionally left for a follow-up PR to keep this diff small and reviewable. Paramount can be added later through the same adapter path.
Current diff size is 630 changed lines (
+603 / -27).Related Issue
N/A
How Has This Been Tested?
Automated checks:
pnpm type-checkpnpm exec eslint ...on touched subtitle/interceptor filesSKIP_FREE_API=true pnpm exec vitest run ...targeted subtitle tests: 5 files / 84 testsWXT_SKIP_ENV_VALIDATION=true pnpm buildlint,type-check, and full Vitest suite: 163 test files / 1399 tests passedManual checks:
Screenshots
N/A
Checklist
Additional Information
This PR withdraws the earlier official-track direction for now. The official Chinese subtitle + official English subtitle comparison feature can come back later as a separate, larger follow-up once it no longer needs to fit inside this small initial adapter PR.