M MediaFlow
Home / Documentation

Documentation

Everything needed to publish a stream and play it back.

Quickstart

Point your origin at the gateway, publish a playlist, then hand the playlist URL to the player. Nothing has to be installed on the origin.

# 1. verify the edge is reachable
curl -s https://your-origin.example/health

# 2. publish a playlist
curl -X POST https://your-origin.example/api/uploadFile/upload.m3u8 \
     -H "Authorization: Bearer $TOKEN" \
     -H "Content-Type: application/vnd.apple.mpegurl" \
     --data-binary @index.m3u8

Publishing a playlist

Playlists are published to the object path that matches your configured route. The gateway stores them with a short TTL and rewrites segment references to edge-relative URLs on the way out.

POST /api/uploadFile/upload.m3u8
Content-Type: application/vnd.apple.mpegurl
Authorization: Bearer <session-token>

#EXTM3U
#EXT-X-VERSION:6
#EXT-X-TARGETDURATION:4
#EXT-X-MEDIA-SEQUENCE:0
#EXTINF:4.000,
segment-00001.ts
#EXTINF:4.000,
segment-00002.ts
#EXT-X-ENDLIST

The route path is configurable per deployment. Requests to the directory itself (/api/uploadFile) return 404 by design.

HTTP API

MethodPathPurpose
GET/healthLiveness and build info
POST/api/uploadFile/upload.m3u8Publish or refresh a playlist
GET/api/uploadFile/<asset>Fetch a stored asset

Playback

Any HLS-capable player will do. Provide the playlist URL and, if you use signed access, a token in the query string or the Authorization header.

<video controls playsinline
       src="https://cdn.example/stream/master.m3u8?token=..."></video>

Error codes

CodeMeaningWhat to do
200OK—
400Malformed playlist or parametersValidate the manifest
401Missing or expired tokenReissue the signed URL
404Unknown objectCheck the published path
429Rate limitedBack off and retry
502Upstream origin unreachableCheck the origin, not the edge
Need something not covered here? Get in touch — we document every question that comes up more than twice.