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.
Upload
Section titled “Upload”- Open Catalog → Series → [series] → Episodes → [episode].
- Scroll to Captions. You’ll see one row per launch language (EN, AR, ID).
- Click Upload next to a language.
- Pick your SRT or VTT file. The API validates the format server-side (rejects malformed timing).
- A green checkmark appears when uploaded; the mobile app will pick up the new track on the next play.
Format tips
Section titled “Format tips”- 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 or remove
Section titled “Replace or remove”- Replace: re-upload; the old asset is soft-deleted (
deleted_atset) 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.
Localization matrix
Section titled “Localization matrix”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.
API calls behind this
Section titled “API calls behind this”| Action | Endpoint |
|---|---|
| Upload caption file | POST /v1/admin/media/captions (multipart form with episodeId, lang, file) |
| Delete caption asset | DELETE /v1/admin/media/assets/:id |
| List captions for episode | GET /v1/admin/media/assets?episodeId=…&kind=caption |
Full details in API: Media.