M3U8 Runner

API Docs

Dokumentasi ringkas endpoint frontend/backend. Endpoint management membutuhkan login dashboard, sedangkan playback dan player tetap publik.

Public

Playback

Dipakai player/viewer.

GET /player
GET /playback/:stream/master.m3u8?key=customer_key&SID=viewer_key
GET /playback/:stream/:quality/index.m3u8
GET /docs/api
GET /customer/login
GET /customer

Auth

Session

Dipakai halaman login dan dashboard.

GET  /api/auth/session
POST /api/auth/login
POST /api/auth/logout

Customer Auth

Portal

Dipakai customer untuk melihat link playback miliknya.

GET  /api/customer-auth/session
POST /api/customer-auth/login
POST /api/customer-auth/logout
GET  /api/customer-portal/links

Protected

Dashboard API

Butuh session cookie login.

GET    /api/accounts
GET    /api/jobs
POST   /api/jobs/start
POST   /api/jobs/:id/stop
GET    /api/jobs/:id/logs
DELETE /api/jobs/:id
GET    /api/files
DELETE /api/files?path=...
GET    /api/viewers
GET    /api/viewers/sessions
GET    /api/customers
POST   /api/customers
DELETE /api/customers/:id
GET    /api/customers/:id/master-link?stream=...

Contoh Login

curl -X POST https://playlist.crxanode.com/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"secret"}' \
  -c cookies.txt

Contoh Ambil Viewers Per Stream

curl https://playlist.crxanode.com/api/viewers/sessions?stream=percin04 \
  -b cookies.txt

Contoh Generate Master Link

curl "https://playlist.crxanode.com/api/customers/buyer-a/master-link?stream=percin043" \
  -b cookies.txt

Contoh Login Customer

curl -X POST https://playlist.crxanode.com/api/customer-auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"buyer.a","password":"buyer-a-secret"}' \
  -c customer-cookies.txt

Environment Auth + Customers

DASHBOARD_USERNAME=admin
DASHBOARD_PASSWORD=change-me
DASHBOARD_SESSION_SECRET=change-me-too
DASHBOARD_SESSION_TTL_SECONDS=43200
CUSTOMERS_PATH=./data/state/customers.json