Repository navigation
Conformance
This article explains part of Radio 2.0 in plain words. It is not normative: where it differs from the specification, the specification is right.
Conformance means that a publisher or consumer follows the rules of the Radio 2.0 specification, checked against the checklist in section 12 and, for documents, against the schemas and the reference tests. The standard does not run a certification programme. It gives a checklist and test files.
| Defined in | Specification section 12 |
| Checklist groups | Publisher: manifest; Publisher: events; Consumer |
| Reference tests |
manifest/conformance_test.go, testdata/invalid/
|
| Status | Draft |
Publisher: manifest
- The manifest validates against the manifest schema, with
specVersionset to"0.2". -
guidis permanent andmanifestUrlnames the canonical address. - At least one discovery method is offered, and stream responses carry the
Linkheader where the server allows it. - The manifest is verified by its homepage.
-
ETag,Cache-Control: max-age=300and 304 onIf-None-Matchare in place; 503 withRetry-Afterfor temporary outages; 404 or 410 only when withdrawn. - Contact fields appear only as the station chose; no hidden listener counts; no upcoming songs.
- When stated,
broadcastmatches the streams'carries, and each transmission has the members its band requires and no others.
Publisher: events (when events is present)
- Every event validates against the event schema, and the SSE
eventandidequaltypeandid. -
now_playingis sent on every state change, with edge events immediately before it. -
item.startedAtis the air time and streams declaretypicalDelayMs. - A message goes out at least every 30 seconds, and
Last-Event-IDresume works. - The poll address answers the latest
now_playingwith anETag. - A value override lasts only until the next
now_playing.
Consumer
- Ignores unknown members when reading and accepts
application/json. - Stores manifests normalised.
- Uses the
manifestUrlcopy and applies verification before trusting a manifest. - Follows the move rules and never treats 503 as removal.
- Shows titles at air time plus stream delay.
- Labels each stream from its own
carries. - Polls no faster than every 5 seconds and fetches manifests no faster than every 5 minutes.
- Renders text as plain text and applies the fetch limits when fetching for others.
- Pays recipients directly, by their splits, with fees shown.
The Go reference implementation tests the standard itself:
- Examples must pass. Every example manifest, the schedule and every event file must validate and parse. The test counts them and expects 14.
-
Invalid files must fail. Each file in
testdata/invalid/must fail, for the reason in its name, at an expected JSON pointer and rule. Names are prefixedmanifest--,event--orschedule--. -
Discovery is tested against local
httptestservers, not real stations. - The command is
go test -race ./....
A change that adds a MUST rule needs an example or a counter-example, which is why CONTRIBUTING requires it.
A validator reports unknown members, a consumer ignores them. The reference library provides both: strict Parse and Validate, and ParseLenient for consumers. See Reference implementation.
Radio 2.0 is an open standard, MIT licensed. Documentation: radio2.org. Questions: Discussions.
Overview
The manifest
Discovery and identity
Live data
Money
Implementations and tools
- Implementations
- Reference implementation
- radio2 command line tool
- Create a manifest
- Conformance
- Stations
- Brand and badges
Project
Documentation
Community