Capabilities
Declare your capabilities
Send a capabilities object in every sync:
"capabilities": {
"canTransposeKey": false,
"canSeek": true,
"canSearchRemotely": false,
"canPreview": false,
"canAnalyzeAudio": false,
"allowsSharing": true,
"allowsCommercialUse": false,
"maxConcurrentRooms": 1
}
Every sync replaces the object as a whole. A flag you leave out reverts to its default, and the defaults are not all false. Send every capability you mean, every time.
| Flag | Type | Default when absent | What declaring it means |
|---|---|---|---|
canTransposeKey |
boolean | false |
You can shift pitch. Nothing in the app offers a key change today, so declaring it changes nothing on screen. |
canSeek |
boolean | true |
Your media answers range requests, so scrubbing works. The app does not yet vary what it offers by this flag. For a bucket we measure it, by asking for a range on every sweep. |
canSearchRemotely |
boolean | false |
You can answer a search the mirrored catalog cannot serve, and fetch what somebody picks. One flag covers both. See Answering on demand. |
canPreview |
boolean | false |
You can serve a moment of a song nobody has fetched yet. Only meaningful alongside canSearchRemotely. See Previewing. |
canAnalyzeAudio |
boolean | false |
Your media responses carry CORS headers. Getting this wrong fails silently — see below. |
allowsSharing |
boolean | true |
Your catalog may be exposed to somebody other than its owner. Set it false if your terms are per-seat. |
allowsCommercialUse |
boolean | false |
Your content is licensed for a venue. Leave it false unless you hold an actual license. |
maxConcurrentRooms |
positive number | no limit | How many parties may use your catalog at once. Send 1 for a per-seat license. Anything that is not a positive number is taken as no limit. |
Which literal counts
| Kind of flag | Default | What counts |
|---|---|---|
| Grants something we would otherwise withhold | false |
Only a literal true. A missing value, "true" and 1 all mean false. |
| Withdraws something we would otherwise assume | true |
Only a literal false. |
A capability this specification does not name is ignored. Nothing verifies a declaration.
What the service enforces
allowsSharing: false— the library can only ever be attached privately. Flip it to false later and existing shared attachments are demoted on the next sync.allowsCommercialUse: false— venue mode refuses the provider.maxConcurrentRooms— attaching past the limit is refused, and the refusal names the parties already using it.
canAnalyzeAudio
Declaring true means every successful response to a request for your media answers a CORS request made in anonymous mode. It claims nothing else — not that you analyze anything, and nothing about canPreview.
Send these on GET <baseUrl>/media/<externalId>?t=<mediaToken>, range requests included, on every 200, 206 and 416:
| Header | Value |
|---|---|
Access-Control-Allow-Origin |
The requesting origin, or *. The Stage sends no credentials, so a wildcard is acceptable. If you echo the origin, also send Vary: Origin. |
Access-Control-Expose-Headers |
Content-Length, Content-Range |
- Every redirect hop does the same.
- Answer
OPTIONSanyway, as Serving media says. No preflight is expected. - A
403or a404is exempt. Neither need carry them, and the bridge’s do not.
See Serving media.
What the Stage does
The Stage reads the flag per track, as it stood when the song was about to play.
| Flag | What the Stage does |
|---|---|
| False or absent | No crossorigin attribute, no audio graph. Playback is unchanged and you owe no CORS headers. A track with no picture shows its artwork, or the Let’s DJ neon sign if it has none, with title and artist. No visualizer. |
| True | crossorigin="anonymous" is set before loading, on every track from you, video included — the Stage cannot know a file has no picture until it has loaded it. A track with no picture also gets an audio analyzer and a visualizer, a row of bars, over that same artwork or sign. Video tracks are not analyzed. |
The attribute is fixed for the life of the element, so a sync that changes the flag affects the next song and not the one playing. Only the Stage’s player does this: previews on phones never set crossorigin and are never analyzed.
Two ways to get it wrong
- Declare
truewithout sending the headers and nothing loads. Withcrossorigin="anonymous"set, a response that lacks them fails outright. The Stage treats the track as unplayable and skips it, and so skips every track from you. There is no fallback. - Route cross-origin media through an analyzer without CORS and it plays silent. The browser raises no error: the audio goes silent and the analyzer reads zeros.
Leaving the flag unset costs nothing. Audio still plays, and still shows its artwork.
The bridge declares true. A bucket never does: a presigned link carries no CORS headers unless the bucket’s owner configured them.