PHPackages                             automattic/jetpack-rtc - 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. automattic/jetpack-rtc

ActiveJetpack-library

automattic/jetpack-rtc
======================

Real-time collaboration websocket transport support using WordPress.com infrastructure

00PHPCI passing

Since Mar 18Pushed 1mo agoCompare

[ Source](https://github.com/Automattic/jetpack-rtc)[ Packagist](https://packagist.org/packages/automattic/jetpack-rtc)[ RSS](/packages/automattic-jetpack-rtc/feed)WikiDiscussions trunk Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

RTC
===

[](#rtc)

Real-time collaboration websocket transport support using WordPress.com infrastructure.

This package extends Gutenberg's Real-Time Collaboration (RTC) feature with a PingHub WebSocket transport provider, replacing the default HTTP polling with persistent WebSocket connections through the WordPress.com PingHub service.

How to install rtc
------------------

[](#how-to-install-rtc)

### Installation From Git Repo

[](#installation-from-git-repo)

Usage
-----

[](#usage)

Add the package as a dependency in your plugin's `composer.json`:

```
"require": {
    "automattic/jetpack-rtc": "@dev"
}
```

Then initialize it in your plugin:

```
use Automattic\Jetpack\Rtc;

RTC::init();
```

Architecture
------------

[](#architecture)

The package has two main layers:

### PHP (`src/`)

[](#php-src)

- **`RTC`** — Main class. Manages providers, enqueues assets, registers REST routes, and handles the RTC settings.
- **`REST_Pinghub_Token`** — REST endpoint that generates short-lived JWTs for PingHub WebSocket authentication.

### JavaScript (`src/js/`)

[](#javascript-srcjs)

- **`rtc.ts`** — Entry point. Registers the PingHub provider via the `sync.providers` filter.
- **`providers/pinghub/`** — PingHub provider implementation:
    - `pinghub-provider.ts` — Yjs provider (thin shell delegating to the manager).
    - `pinghub-manager.ts` — Per-room sync protocol, awareness, and reconnection logic.
    - `pinghub-bridge.ts` — WebSocket transport layer.
    - `keepalive-worker.ts` — Web Worker for awareness keepalive ticks.

Contribute
----------

[](#contribute)

Get Help
--------

[](#get-help)

Using this package in your WordPress plugin
-------------------------------------------

[](#using-this-package-in-your-wordpress-plugin)

If you plan on using this package in your WordPress plugin, we would recommend that you use [Jetpack Autoloader](https://packagist.org/packages/automattic/jetpack-autoloader) as your autoloader. This will allow for maximum interoperability with other plugins that use this package as well.

Security
--------

[](#security)

Need to report a security vulnerability? Go to  or directly to our security bug bounty site .

License
-------

[](#license)

rtc is licensed under [GNU General Public License v2 (or later)](./LICENSE.txt)

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance61

Regular maintenance activity

Popularity0

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 Bus Factor1

Top contributor holds 50% 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c5869ecbb8e0eac7e8b8e0f3cf7bdd8d5fcdc4abc10a72281872c53f8639d44?d=identicon)[automattic](/maintainers/automattic)

---

Top Contributors

[![mmtr](https://avatars.githubusercontent.com/u/1233880?v=4)](https://github.com/mmtr "mmtr (7 commits)")[![bindlegirl](https://avatars.githubusercontent.com/u/1242807?v=4)](https://github.com/bindlegirl "bindlegirl (2 commits)")[![tbradsha](https://avatars.githubusercontent.com/u/32492176?v=4)](https://github.com/tbradsha "tbradsha (2 commits)")[![anomiex](https://avatars.githubusercontent.com/u/1030580?v=4)](https://github.com/anomiex "anomiex (1 commits)")[![kraftbj](https://avatars.githubusercontent.com/u/88897?v=4)](https://github.com/kraftbj "kraftbj (1 commits)")[![rcrdortiz](https://avatars.githubusercontent.com/u/1989914?v=4)](https://github.com/rcrdortiz "rcrdortiz (1 commits)")

### Embed Badge

![Health badge](/badges/automattic-jetpack-rtc/health.svg)

```
[![Health](https://phpackages.com/badges/automattic-jetpack-rtc/health.svg)](https://phpackages.com/packages/automattic-jetpack-rtc)
```

PHPackages © 2026

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