PHPackages                             ernestdefoe/onair - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. ernestdefoe/onair

ActiveFlarum-extension[API Development](/categories/api)

ernestdefoe/onair
=================

Live streaming for Flarum 2 — members go live via YouTube or Twitch, with a LIVE badge that follows their avatar everywhere.

v0.1.0(2d ago)00MITHTMLPHP ^8.3CI passing

Since Jun 7Pushed 2d agoCompare

[ Source](https://github.com/ernestdefoe/onair)[ Packagist](https://packagist.org/packages/ernestdefoe/onair)[ Docs](https://github.com/ernestdefoe/onair)[ RSS](/packages/ernestdefoe-onair/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

OnAir — Live Streaming for Flarum 2
===================================

[](#onair--live-streaming-for-flarum-2)

[![License: MIT](https://camo.githubusercontent.com/7013272bd27ece47364536a221edb554cd69683b68a46fc0ee96881174c4214c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c75652e737667)](LICENSE)

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.

[![OnAir — the LIVE badge follows a streamer's avatar everywhere, with a Live Now sidebar widget](screenshots/onair-live-badge.png)](screenshots/onair-live-badge.png)

> **Free / MIT.** The optional premium add-on **[OnAir+](https://github.com/ernestdefoe/onair-plus)**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](#onair-vs-onair) below.

Features
--------

[](#features)

- 🔴 **LIVE badge on every avatar** — one `Avatar` override lights a streamer up everywhere.
- ▶️ **YouTube + Twitch embed viewer** — paste a channel/video URL and go live.
- 📡 **Presence with graceful fallback** — uses `flarum/realtime` for instant badge updates when installed, transparently falls back to lightweight polling when it isn't.
- 🟥 **Live Now widget + a `/onair` directory** — 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

[](#the-live-directory)

[![The /onair live directory listing everyone currently streaming](screenshots/onair-directory.png)](screenshots/onair-directory.png)

OnAir vs OnAir+
---------------

[](#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

[](#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+ playing a live RTMP→HLS stream in the forum with the live chat panel](screenshots/onairplus-live-stream.png)](screenshots/onairplus-live-stream.png)

### OnAir+ — creator studio

[](#onair--creator-studio)

Each streamer gets an ingest URL, a secret stream key, multistream targets, and a one‑click key reset.

[![OnAir+ streaming studio showing the ingest server, masked stream key and playback URL](screenshots/onairplus-studio.png)](screenshots/onairplus-studio.png)

Install
-------

[](#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
-----------

[](#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`](preview/index.html).

Architecture notes
------------------

[](#architecture-notes)

- **LIVE badge:** overrides the shared `Avatar` component (main‑bundle, safe to extend at init) and reads a serializer‑supplied `user.isLive()`.
- **Presence transport:** `app.onair.presence` picks `RealtimeTransport` when `flarum/realtime` is detected, else `PollingTransport`; both expose the same API.
- **Providers:** `app.onair.providers` (JS) + the `StreamProvider` interface (PHP) are the extension points **OnAir+** plugs its RTMP/HLS provider into.

License
-------

[](#license)

MIT © Ernestdefoe

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance99

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/c9978664264055711c21fbcf73c937f758df771d9cb40f6a25370b10123e7abc?d=identicon)[ernestdefoe](/maintainers/ernestdefoe)

---

Top Contributors

[![ernestdefoe](https://avatars.githubusercontent.com/u/24905286?v=4)](https://github.com/ernestdefoe "ernestdefoe (7 commits)")

---

Tags

streamstreamingyoutubetwitchflarumliveBroadcast

### Embed Badge

![Health badge](/badges/ernestdefoe-onair/health.svg)

```
[![Health](https://phpackages.com/badges/ernestdefoe-onair/health.svg)](https://phpackages.com/packages/ernestdefoe-onair)
```

###  Alternatives

[flarum-lang/russian

Russian language pack for Flarum.

12127.5k](/packages/flarum-lang-russian)[flarum-lang/french

French language pack to localize the Flarum forum software plus its official and third-party extensions.

1936.5k](/packages/flarum-lang-french)[amaurycarrade/flarum-ext-syndication

Brings RSS and Atom feeds to Flarum

203.7k](/packages/amaurycarrade-flarum-ext-syndication)[nystudio107/craft-youtubeliveembed

This plugin allows you to embed a YouTube live stream and/or live chat on your webpage

143.8k](/packages/nystudio107-craft-youtubeliveembed)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
