Skip to content

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

872 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Subtitle App

A mobile-friendly web app for watching videos with SRT/VTT subtitle files. Import subtitles (as .srt, .vtt, or .zip archives), pick a subtitle file, and use the player page to watch along — with transcript view, playback speed control, a YouTube-style timeline scrubber, and adjustable subtitle text size.

Live at https://subtitle.pmil.me.

Built as a React Router SPA (client-side rendering with prerendered pages), deployed to Cloudflare Workers (static assets plus a Hono API Worker for signaling).

Device sync

Connect your own devices to control playback across them — for example, place a tablet below the TV showing subtitles and control it from your phone.

  • Each device has a permanent pairing code. Tap Start pairing to show your code and QR, then scan it (or type the code) from your other device to connect them.
  • Up to five devices form a remembered peer-to-peer mesh. Any device can display subtitles or control playback, while an internal coordinator is elected automatically.
  • Subtitles transfer directly between devices over encrypted WebRTC data channels. No subtitle content or group membership is stored on or served by the server — a hibernatable Durable Object only relays bounded SDP/ICE signaling between currently online members. Pairing is direct-only, so devices must be on networks that permit direct connectivity.
  • The connection is remembered: reopening the app reconnects your devices automatically.
  • The group code is a bearer invitation: anyone with it can join as an equal member. Use Create new group to rotate the code and revoke the old invitation.

Stack

  • React Router v8 (SPA mode, ssr: false)
  • React 19, TypeScript 7, Vite 8 (Rolldown)
  • MobX 7 + mobx-react-lite 5 for player state
  • Tailwind CSS 4
  • IndexedDB (via idb) for subtitle storage
  • Cloudflare Workers and hibernatable Durable Objects via Wrangler 4, with STUN-assisted direct WebRTC connectivity

Development

pnpm install
pnpm dev

The API Worker (sync signaling) does not run under pnpm dev. To test the sync feature locally:

pnpm build
npx wrangler dev

Open http://localhost:8787 in two browser tabs (or localhost and 127.0.0.1 for separate IndexedDB) to test pairing.

Build & deploy

pnpm build          # production build to build/client
pnpm start          # serve the production build locally
npx wrangler deploy # deploy the Worker and static assets

Checks

pnpm typecheck

Tooling notes

  • Node 24 (see .node-version), pnpm 11 (see packageManager in package.json)
  • pnpm settings live in pnpm-workspace.yaml
  • auto-imports.d.ts is generated by unplugin-auto-import during dev/build

About

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages