Skip to Content
Xeonr Developer Docs

Start playback

POST
/xmb.api.v1.PlaybackService/StartPlayback

Chooses a file for an episode against the caller's decoder, and returns where to fetch it and what authorises the fetch.

Required scopes: xmb:user:read

Authorization

BearerAuth
AuthorizationBearer <token>

An access token issued by the xeonr identity provider.

In: header

Header Parameters

Connect-Protocol-Version?number

Define the version of the Connect protocol

Connect-Timeout-Ms?number

Define the timeout, in ms

Request Body

application/json

serverSlug?string
Length1 <= length <= 128
episodeUuid?string

What the viewer chose. An episode, never a file: a film is a feature episode in season 0, which is the one grain the whole viewer surface uses.

Formatuuid
mediaFileUuid?|

Which cut, when the caller has already chosen one from the version picker. Absent lets the server choose, and it picks the best cut the caller can actually decode rather than simply the largest.

Formatuuid
capabilities*

REQUIRED. There is no default profile and no named-client fallback to guess from, which is the entire point.

preferredAudioLanguages?array<>

ISO 639 codes, most wanted first. A hint that decides the server's default track pick and nothing else; under direct play the caller holds every track and may change its mind for free.

Itemsitems <= 8
preferredSubtitleLanguages?array<>
Itemsitems <= 8
qualityId?|

A rung id from a previous response. Absent takes the server's choice, which is the source rung. Any other value is refused with Unimplemented today — an honest refusal rather than a control that silently does nothing.

Lengthlength <= 64
audioTrackId?|

An audio track id from a previous response, when the viewer has overridden the server's pick. Absent means "whatever preferred_audio_languages and the container's dispositions decided", which is the answer almost every time.

ON THE REQUEST, not purely a client-side affair, and that is the whole point of the field. Under direct play the file is served as it lies, so the track that plays is the container's default and nothing the server does can change that. A caller with can_select_audio_track can therefore honour its own choice for free; a caller without it — every browser — can only get a different track by being sent a different stream, which is a remux.

So this field is what turns an audio choice into a strategy decision. It is refused with Unimplemented and a TranscodeRequired detail today, exactly as quality_id is, whenever it names a track the caller cannot select itself and the container does not default to. Naming the track the caller would have got anyway is always free.

Lengthlength <= 64
subtitleTrackId?|

The subtitle track the viewer wants, when the server needs to know. Absent is the ordinary case: a client that can fetch a sidecar and draw it needs no help and says nothing.

It is here for the burn-in arm below, which is the one case where showing a subtitle is the server's job rather than the client's — and the server cannot draw a track nobody named.

Lengthlength <= 64
client?

Who is asking, for the session list an owner reads. Never consulted by the negotiation — nothing here may change which delivery comes back, or the same file would play differently on two devices that decode identically.

Field 11 because 10 is reserved: it carried subtitle_burn_in, which became two ordered delivery lists.

[key: string]?never

Response Body

application/json

application/json

curl -X POST "https://xmb.gg/xmb.api.v1.PlaybackService/StartPlayback" \  -H "Connect-Protocol-Version: 1" \  -H "Connect-Timeout-Ms: 1000" \  -H "Content-Type: application/json" \  -d '{    "capabilities": "map[audio:[map[codec:eac3 maxChannels:8 passthrough:true] map[codec:aac maxChannels:6 passthrough:false]] canSelectAudioTrack:true containers:[mp4 matroska] hdrFormats:[sdr hdr10 dv] localTrust:LOCAL_TRUST_ANCHOR_PINNED_SPKI maxHeight:2160 maxWidth:3840 subtitleDeliveryGraphic:[SUBTITLE_DELIVERY_EMBEDDED SUBTITLE_DELIVERY_BURNED_IN] subtitleDeliveryText:[SUBTITLE_DELIVERY_EMBEDDED SUBTITLE_DELIVERY_EXTERNAL] subtitleFormats:[ass webvtt] supportsHls:true video:[map[codec:hevc maxBitDepth:10 maxLevel:5.1 profiles:[Main Main 10]] map[codec:h264 maxBitDepth:8 maxLevel:5.2 profiles:[High]]]]"  }'
{
  "sessionId": "a7b8c9d0-e1f2-4a3b-9c4d-5e6f7a8b9c0d",
  "media": "map[audioCodec:ac3 badges:[QUALITY_BADGE_FHD QUALITY_BADGE_SURROUND_5_1] bitrateBps:4931000 container:matroska durationMs:3483000 episodeUuid:e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b hdrFormat:sdr height:1080 mediaFileUuid:7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f sizeBytes:2147483648 versionName:Remastered 16:9 videoBitDepth:8 videoBitrateBps:4400000 videoCodec:h264 videoFrameRate:23.976 videoProfile:High width:1920]",
  "delivery": "map[contentLength:2147483648 expiresAt:2026-10-22T20:20:00Z gatewayUrl:https://6f1c9d2e-4a3b-4c5d-8e9f-0a1b2c3d4e5f.stream.xmb.gg/media/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f/file/media.mkv?t=eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy hubName:nas hubUuid:6f1c9d2e-4a3b-4c5d-8e9f-0a1b2c3d4e5f localUrls:[https://192-168-1-20.k3f9x2ab.xmbsrv.com:8443/media/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f/file/media.mkv?t=eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy] mediaToken:eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy mimeType:video/x-matroska nodeKind:hub playlistStartMs:0 renewAfter:2026-10-22T20:15:30Z strategy:PLAYBACK_STRATEGY_DIRECT]",
  "ladder": [
    "map[available:true bitrateBps:4931000 hdrFormat:sdr height:1080 id:source isSource:true selected:true unavailableReason:RUNG_UNAVAILABLE_REASON_UNSPECIFIED width:1920]",
    "map[available:false bitrateBps:3128000 hdrFormat:sdr height:720 id:720p isSource:false selected:false unavailableReason:RUNG_UNAVAILABLE_REASON_REQUIRES_TRANSCODE width:1280]"
  ],
  "audioTracks": [
    "map[bitrateBps:448000 channelLayout:5.1(side) channels:6 codec:ac3 id:s1 isDefault:true language:eng sampleRate:48000 selected:true source:TRACK_SOURCE_EMBEDDED title:Surround 5.1]"
  ],
  "subtitleTracks": [
    "map[codec:subrip delivery:SUBTITLE_DELIVERY_EXTERNAL deliveryFormat:webvtt id:s3 isDefault:false isForced:false isSdh:true language:eng selected:false source:TRACK_SOURCE_EMBEDDED textBased:true title:English (SDH) unavailableReason:SUBTITLE_UNAVAILABLE_REASON_UNSPECIFIED url:https://6f1c9d2e-4a3b-4c5d-8e9f-0a1b2c3d4e5f.stream.xmb.gg/media/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f/subs/s3.vtt?t=eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy]"
  ],
  "chapters": [
    "map[endMs:312000 imageUrl:https://6f1c9d2e-4a3b-4c5d-8e9f-0a1b2c3d4e5f.stream.xmb.gg/media/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f/chapter/0.jpg?t=eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy startMs:0 title:Opening]"
  ],
  "trickplay": "map[frameCount:349 intervalMs:10000 sheetCount:4 sheetUrlTemplate:https://6f1c9d2e-4a3b-4c5d-8e9f-0a1b2c3d4e5f.stream.xmb.gg/media/7c8d9e0f-1a2b-4c3d-8e4f-5a6b7c8d9e0f/trickplay/{n}.jpg?t=eyJhbGciOiJFZERTQSIsImtpZCI6IjIwMjYtMDgtMDQiLCJ0eXAiOiJKV1QifQ.eyJhdWQiOiI2ZjFjOWQyZSJ9.c2lnbmF0dXJlLXBsYWNlaG9sZGVy tileColumns:10 tileHeight:180 tileRows:10 tileWidth:320]",
  "progress": "map[durationMs:3483000 lastPlayedAt:2026-10-21T21:40:12Z positionMs:1834000 resumeEpisodeNumber:4 resumeEpisodeUuid:e1a2b3c4-d5e6-4f70-8a9b-0c1d2e3f4a5b resumeSeasonNumber:3 status:WATCH_STATUS_IN_PROGRESS totalEpisodes:60 watchedEpisodes:27]",
  "transcode": "map[audioAction:TRANSCODE_ACTION_ENCODE audioBitrateBps:192000 audioChannels:2 audioCodec:aac hdrOut:sdr reasons:[TRANSCODE_REASON_AUDIO_SELECTION] tonemap:false videoAction:TRANSCODE_ACTION_COPY]",
  "markers": [
    "map[confidence:0.92 endMs:402000 kind:PLAYBACK_MARKER_KIND_INTRO source:PLAYBACK_MARKER_SOURCE_DETECTED startMs:312000]",
    "map[confidence:0.88 endMs:3483000 kind:PLAYBACK_MARKER_KIND_CREDITS source:PLAYBACK_MARKER_SOURCE_DETECTED startMs:3396000]"
  ]
}