Media
The media domain handles asset uploads, processing, and storage. Assets live in SeaweedFS under the playtelly bucket, organised by tenant and folder.
API base: /api/media/
Pages: /media, /media/upload
Concepts
Tenant — top-level namespace, e.g. jastv, food
Folder — logical subfolder within a tenant, e.g. video, banners, bgm
storageKey — the full path within the bucket, e.g. food/video/kitchen.mp4
Asset URL — served via CoreAPI at /assets/{storageKey} → proxied to SeaweedFS
When referencing media in a channel fallback playlist, use storageKey only — the playtelly bucket prefix is baked into the streamer's http-remote config.
Testing Media
List media — /media
Navigate to http://localhost:15173/media.
- Lists all uploaded assets with thumbnails, file size, type, and status
- Filter by type (video / image / audio) and folder
- Click any asset to preview — images render inline, videos play in browser
Media library showing uploaded assets with thumbnails and metadata
Upload media — /media/upload
Navigate to http://localhost:15173/media/upload.
- Select tenant and folder (e.g.
food/video) - Drag or select a file
- Upload uses TUS resumable protocol — can resume interrupted uploads
- After upload completes, CoreAPI processes the file (thumbnail generation for video/image)
- Asset appears in
/mediaoncestatus=ready
Resumable upload form with tenant/folder selection
Verify asset is accessible
After uploading kitchen.mp4 to food/video:
# check asset is in SeaweedFS
curl -I http://localhost:8333/playtelly/food/video/kitchen.mp4
# check CoreAPI serves it via assets proxy
curl -I http://localhost:3000/assets/food/video/kitchen.mp4
# check streamer can fetch it via http-remote
curl -I http://localhost:18080/food/video/kitchen.mp4
All should return 200 OK.
SeaweedFS browser
http://localhost:8888 — browse the playtelly bucket directly to verify uploads landed in the right path.
Key API Endpoints
GET /api/media/ list media (paginated, filter by type/folder/status)
GET /api/media/:id get single media item
GET /api/media/folders list all folders
GET /api/media/tenants list all tenants
POST /api/media/:id/process retry processing (thumbnail regeneration)
TUS upload flow:
POST /files/ prepare upload token
PATCH /files/:id upload chunks (TUS protocol)
CoreAPI tusPostFinish hook moves file to correct folder, triggers processing