JustOnAir docs
View as Markdown

Hosted player

Put the player on any page with one iframe. It waits, starts by itself, handles reconnects, and ends cleanly.

Every stream has an embed_url, https://play.joacdn.com/{id}. It is a complete player page: embed it, or send the link.

HTML
<iframe src="https://play.joacdn.com/str_e1bzk3dxw9z9allei6n7"
  allow="autoplay; fullscreen; picture-in-picture" allowfullscreen
  style="aspect-ratio:16/9;width:100%;border:0"></iframe>

The allow list lets the player start by itself and go full screen. The style makes it fill the width of its container at 16:9; any fixed size works too.

What viewers see

WhenThe player shows
Before you go liveA waiting screen with the stream name and "Starting soon". It checks every few seconds; nobody has to refresh.
Going live"Going live", then the picture, 10–20 seconds after the publisher starts.
LiveThe video with play, volume, a LIVE badge, time since start, quality (Auto, 1080p, 720p, 480p), picture-in-picture and full screen.
Viewer paused or fell behindThe badge says GO LIVE. One click jumps back to the live edge.
Publisher drops for a momentThe last picture, blurred, with "Reconnecting…". Playback resumes by itself.
After you end the streamThe last seconds play out, then "Stream ended" with how long it was live.
After the end, with replay on"Stream ended" with a Watch the replay button once the recording is ready. The recording plays with a seek bar.
With a public thumbnailThe stream's newest frame as the poster, and blurred behind "Going live" and "Stream ended". See Thumbnails.
Watch-time budget used up"This watch page has closed".
A channel between its streams"Offline", or "Next stream" with the planned time when scheduled_at is set. It switches to the next stream by itself when the key connects.
Expired, cancelled or a wrong link"This stream isn't available" or "We couldn't find this stream".
With chat onLive chat beside the video (below it on phones), and emoji reactions over the video. Reactions follow the video: they float at the moment of the stream they were sent at, however far behind live the viewer is. In an embed, a Chat button opens it over the video. See Chat and reactions.
Opened with a viewer token (#vt= on the link)Chat knows who they are: "Chatting as" their name with a check mark, no nickname box, and the same check mark next to their messages. A token with role moderator shows the moderator bar. A refused token shows a short notice, and chat works anonymously.
A members-only stream (player.require_viewer_token) without a viewer token"Members only": open the stream from the site you signed in on. No video, no chat box. With a token it plays as usual; a removed viewer, or one whose token's time is up, sees "Your access to this stream ended".

Browsers only allow sound to start after a click. The player tries with sound first; if the browser refuses, it plays muted and shows Tap to unmute. Volume is remembered per browser. Keyboard: space or K play/pause, M mute, F full screen, L jump to live.

The watch page reads the stream's status from a public endpoint, and for a live stream that answer includes a playback URL valid for the whole stream. Anyone who knows the stream id (it is in every playback URL) can read it.

If your viewers log in to your site, make the stream members only instead: "player": {"require_viewer_token": true}, and open the player with a viewer token for each viewer. The public read then has no URL; each viewer gets their own, for as long as their token says.

If you sell access with your own short-lived per-viewer playback tokens and your own player, switch the hosted player off for those streams:

Shell
curl -X PATCH https://api.justonair.com/v1/streams/str_e1bzk3dxw9z9allei6n7 \
  -H "Authorization: Bearer $JOA_API_KEY" -H "Content-Type: application/json" \
  -d '{"player": {"enabled": false}}'

The watch page then shows the stream as unavailable, and the public read returns no URL. Your own player, fed by playback-token, is unaffected.

The stream name

The player shows the stream's name in the waiting room, over the video and on the end screen. If the name is only for you ("Member 4411 private session"), hide it:

Shell
curl -X PATCH https://api.justonair.com/v1/streams/str_e1bzk3dxw9z9allei6n7 \
  -H "Authorization: Bearer $JOA_API_KEY" -H "Content-Type: application/json" \
  -d '{"player": {"show_name": false}}'

Hidden means the name never reaches the public page at all. You can also set it when creating the stream, or with the switch in the dashboard's Stream settings.

Limit quality and watch time

Two settings keep the cost of a big audience in your hands. Set them when creating the stream or later with PATCH:

Shell
curl -X PATCH https://api.justonair.com/v1/streams/str_e1bzk3dxw9z9allei6n7 \
  -H "Authorization: Bearer $JOA_API_KEY" -H "Content-Type: application/json" \
  -d '{"player": {"max_height": 720, "watch_minutes_limit": 60000}}'
  • max_height (480, 720 or 1080): the tallest quality the player offers. Viewers on a 1080p stream capped at 720 watch at most 720p, which roughly halves what they download. It lowers cost; it is not access control.
  • watch_minutes_limit: a budget in viewer-minutes (60,000 = 1,000 viewer-hours), counted by the player. When it is used up the page shows This watch page has closed and playing viewers stop within about a minute. The stream itself keeps running, so anything else it feeds is unaffected. player.closed_at on the stream says when it happened; a new budget reopens the page. The budget is the live show; with watch_minutes_limit_includes_replay: true it also counts the replay and closes it when used up.

Options on the address

Add these to embed_url:

OptionExampleEffect
title?title=Friday%20YogaShow this title instead of the stream name.
accent?accent=ff7a3dYour colour (6 hex digits) instead of JustOnAir lime, for the LIVE badge, buttons and progress.
muted?muted=1Start muted.
autoplay?autoplay=0Wait for a click instead of starting by itself.
chat?chat=0No chat, even when the stream has it. ?chat=1 opens it straight away in an embed.
reactions?reactions=0No reaction bar and no floating emoji, even when the stream has reactions.
lang?lang=trThe player and its chat in Turkish (tr) or English (en): the waiting, live and ended screens, buttons and labels. Default: the viewer's browser language.

To allow embedding only on your own sites, set player.allowed_domains on the stream. See Allowed sites.

Combine them with &: https://play.joacdn.com/str_…?title=Launch&accent=ff7a3d&muted=1.

Viewer counts

The player reports how many people are watching, so you see it live in the dashboard and in viewers on the stream:

JSON
"viewers": {
  "now": { "watching": 1240, "waiting": 85, "buffering_pct": 1.8, "measured_at": "2026-09-29T19:04:10Z", "exact": false },
  "peak": 1302,
  "peak_at": "2026-09-29T19:01:00.000Z",
  "watch_minutes": 18422,
  "source": "player",
  "cdn_counted_until": "2026-09-29T18:00:00.000Z"
}
  • Live, from the player. Up to about 400 viewers every player reports and the count is exact. Above that, only a random sample reports and the count is an estimate within about 5%, so a stream with 100,000 viewers sends the same small number of reports as one with 400. buffering_pct is the share of viewers whose video is stalled: if it climbs, lower your bitrate or check your upload. One network address counts for at most 100 viewers per stream, so a large audience behind a single address (an office, a campus) shows low here; the CDN count below is not affected.
  • Afterwards, from the CDN. About an hour later, the CDN's own logs give the exact count for every player, including your own players and apps. peak and watch_minutes switch to it (source: "cdn").
  • Nothing personal. Each page load reports a random id, whether it is waiting, playing, paused or buffering, and nothing else. No cookies, no IP addresses stored. Countries come from the CDN's logs, and only the total per country is kept.

GET /v1/streams/{id}/viewers returns the curve, minute by minute, and countries: the share of watch time from each country, from the CDN logs. GET /v1/streams carries viewers_now on every stream, so one call shows every live audience, and GET /v1/usage has watch_minutes per day.

Things to know

  • Thumbnails are private unless you say so. The player shows a frame of the stream only when thumbnail.public is on; see Thumbnails.
  • Anyone with the link can watch. The player is public by design. For members-only viewing, use your own player with short-lived links from your backend.
  • The player carries a small JustOnAir mark. Removing it is not an option yet.
  • Corporate networks. Some company firewalls block newly registered domains, and joacdn.com is new. If a viewer at an office sees an error while everyone else plays fine, that is the cause.
  • Delay. Viewers are 10–15 seconds behind the publisher.
  • Large audiences. The player and its status checks are served from the CDN, so a waiting room of 50,000 people costs the same to our servers as one of 50.