Skip to content

Add captions

Captions are stored as media_asset rows with kind='caption' and a lang column. They’re linked to a specific episode via episode_id. The mobile client fetches them alongside the HLS manifest at play time.

  1. Open Catalog → Series → [series] → Episodes → [episode].
  2. Scroll to Captions. You’ll see one row per launch language (EN, AR, ID).
  3. Click Upload next to a language.
  4. Pick your SRT or VTT file. The API validates the format server-side (rejects malformed timing).
  5. A green checkmark appears when uploaded; the mobile app will pick up the new track on the next play.
  • VTT is preferred. SRT works but is converted internally to VTT for HLS packaging.
  • Timing precision: millisecond-precise timestamps (00:00:12.500) render best on iOS. Second-precise SRTs (00:00:12) still work.
  • Line length: keep under 42 chars/line for two-line stacks: anything longer wraps awkwardly on smaller phones.
  • Arabic captions need right-to-left mark (RLM, U+200F) in mixed-script lines. Don’t ship raw LTR files for AR.
  • Replace: re-upload; the old asset is soft-deleted (deleted_at set) and the new one takes its slot.
  • Remove: click the trash icon on the caption row. The asset is soft-deleted and the mobile app stops offering that language track.

Neither action removes bytes from Cloudflare: assets are marked deleted in our DB. Actual purge is a phase-2 background task.

If your series targets EN + AR + ID but a caption file is missing for a language, the publish workflow shows a soft warning on the series detail. It doesn’t hard-block publishing (some content is intentionally single-language), but the audit log flags it.

ActionEndpoint
Upload caption filePOST /v1/admin/media/captions (multipart form with episodeId, lang, file)
Delete caption assetDELETE /v1/admin/media/assets/:id
List captions for episodeGET /v1/admin/media/assets?episodeId=…&kind=caption

Full details in API: Media.