Dashboard

Playback Manifest

Exchanges a playback token for the HLS master playlist URL plus rendition metadata. This is the endpoint the Player SDK calls internally — you rarely need to invoke it directly unless you're embedding a custom HLS player.

Endpoint

GET /v1/video/playback/manifest/{token}

Authentication

The token is the credential. No x-ansdev-key header — passing one is ignored. The token is bound to a single video and a 5-minute window.

Parameters

NameInTypeRequiredDescription
tokenpathstringyesPlayback token (pt_…)

Response

200 OK

{
  "success": true,
  "data": {
    "masterPlaylistUrl": "https://cdn.ansdev.cloud/vid_abc123def456/master.m3u8",
    "qualities": ["1080p", "720p", "480p"],
    "encrypted": true,
    "expiresAt": "2026-05-23T12:05:00Z"
  }
}
FieldTypeNotes
masterPlaylistUrlstringHLS .m3u8 master playlist URL
qualitiesstring[]Renditions available in the master playlist
encryptedbooleanWhether segments are AES-128 encrypted (key fetched via a separate signed URL)
expiresAttimestampToken expiry — refresh by generating a new token

ℹ️ The SDK handles all of this

The Player SDK accepts a playback token attribute and performs this exchange, manifest parsing, ABR selection, and encryption key fetching automatically. Reach for this endpoint only when integrating a custom HLS player like hls.js or Shaka.

CDN behaviour

  • .m3u8 playlistsCache-Control: no-cache (always revalidate)
  • .ts segments — content-hashed paths, immutable for 1 year
  • AES-128 keys — fetched over HTTPS from a short-lived signed URL, never cached on intermediaries

All assets are served from a global CDN with zero egress charges.

Encrypted videos

If encrypted: true, each .m3u8 line includes an #EXT-X-KEY tag pointing to a short-lived AES-128 key URL. Standard HLS players (hls.js, Shaka, native iOS Safari) handle this transparently.

Errors

StatusCodeWhen
401PLAYBACK_TOKEN_EXPIREDToken older than 5 minutes
401PLAYBACK_TOKEN_INVALIDToken signature mismatch or videoId mismatch
404VIDEO_NOT_FOUNDVideo deleted after the token was issued

Example

curl https://api.ansdev.cloud/v1/video/playback/manifest/pt_eyJhbGciOi...
const { data } = await fetch(
  `https://api.ansdev.cloud/v1/video/playback/manifest/${token}`,
).then((r) => r.json());

// Plug into hls.js
import Hls from 'hls.js';
const video = document.querySelector('video');
const hls = new Hls();
hls.loadSource(data.masterPlaylistUrl);
hls.attachMedia(video);