ernestdefoe / onair
Live streaming for Flarum 2 — members go live via YouTube or Twitch, with a LIVE badge that follows their avatar everywhere.
Package info
Language:HTML
Type:flarum-extension
pkg:composer/ernestdefoe/onair
Requires
- php: ^8.3
- flarum/core: ^2.0
Suggests
- ernestdefoe/onair-plus: OnAir+ add-on — built-in RTMP server (self-hosted or managed ingest), HLS playback, multistream, VOD, live chat and notifications.
- flarum/realtime: ^1.0 — enables instant LIVE-badge push; OnAir transparently falls back to polling without it.
This package is auto-updated.
Last update: 2026-06-08 20:19:50 UTC
README
Bring live video into your community. Members go live from YouTube or Twitch, and a LIVE NOW badge follows their avatar everywhere it appears — posts, the discussion list, mentions, the header, the sidebar.
Free / MIT. The optional premium add-on OnAir+ turns your forum into the whole platform — a built-in RTMP server (stream straight in from OBS), in‑forum HLS playback, multistream, VOD, live chat, go‑live notifications and scheduled streams. See the comparison below.
Features
- 🔴 LIVE badge on every avatar — one
Avataroverride lights a streamer up everywhere. - ▶️ YouTube + Twitch embed viewer — paste a channel/video URL and go live.
- 📡 Presence with graceful fallback — uses
flarum/realtimefor instant badge updates when installed, transparently falls back to lightweight polling when it isn't. - 🟥 Live Now widget + a
/onairdirectory — see who's streaming at a glance. - 🔐 Permissions + admin settings — who can go live, default provider, poll interval.
- ⏱️ Stale‑stream reaper — auto‑ends streams left running.
The Live directory
OnAir vs OnAir+
OnAir (this extension) is free and complete on its own for YouTube/Twitch streamers. OnAir+ is a paid add‑on for communities that want to host streaming themselves.
| OnAir (free) | OnAir+ | |
|---|---|---|
| LIVE badge on avatar, everywhere | ✅ | ✅ |
Live Now widget + /onair directory |
✅ | ✅ |
| YouTube embed viewer | ✅ | ✅ |
| Twitch embed viewer | ✅ | ✅ |
| Realtime presence + polling fallback | ✅ | ✅ |
| Permissions + admin settings | ✅ | ✅ |
| Auto‑end stale streams | ✅ | ✅ |
| Built‑in RTMP server → in‑forum HLS | — | ✅ |
| Stream keys + creator studio | — | ✅ |
| Multistream / restream to YouTube + Twitch | — | ✅ |
| VOD recordings | — | ✅ |
| Live chat overlay | — | ✅ |
| Go‑live notifications + follow a streamer | — | ✅ |
| Scheduled streams + reminders | — | ✅ |
| Concurrent viewer counts | — | ✅ |
OnAir+ — stream straight into the forum
Members broadcast from OBS to your own server; viewers watch an hls.js player inline,
with live chat beside it.
OnAir+ — creator studio
Each streamer gets an ingest URL, a secret stream key, multistream targets, and a one‑click key reset.
Install
composer require ernestdefoe/onair
Then enable OnAir in the admin panel. Optionally install flarum/realtime for
instant (push) LIVE badges — OnAir detects it automatically. For self‑hosted streaming,
add OnAir+ (composer require ernestdefoe/onair-plus).
Development
cd js npm install npm run build # or: npm run dev (watch)
A no‑backend concept render of the whole product lives in preview/index.html.
Architecture notes
- LIVE badge: overrides the shared
Avatarcomponent (main‑bundle, safe to extend at init) and reads a serializer‑supplieduser.isLive(). - Presence transport:
app.onair.presencepicksRealtimeTransportwhenflarum/realtimeis detected, elsePollingTransport; both expose the same API. - Providers:
app.onair.providers(JS) + theStreamProviderinterface (PHP) are the extension points OnAir+ plugs its RTMP/HLS provider into.
License
MIT © Ernestdefoe



