npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

red5pro-conference-sdk

v1.0.10

Published

Red5 Pro Conference SDK

Downloads

566

Readme

Red5 Pro Conference SDK

The Red5 Pro Conference SDK is a browser toolkit for building multi-party video conferencing applications on Red5 Cloud and Red5 Pro. It handles room membership, publishing and subscribing over WHIP/WHEP, WebRTC statistics, chat and file sharing, screen sharing, virtual backgrounds, noise suppression and local recording.

Full documentation: Conference SDK guide · API Reference · Examples

Installation

npm install red5pro-conference-sdk
import { ConferenceClient, ConferenceEvents } from 'red5pro-conference-sdk';

Or with script tags. Load PubNub first; the SDK bundle already includes the Red5 WebRTC SDK.

<script src="https://cdn.pubnub.com/sdk/javascript/pubnub.10.2.5.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/red5pro-conference-sdk@1/red5pro-conference-sdk.min.js"></script>
<script>
  const { ConferenceClient, ConferenceEvents } = red5proConferenceSdk;
</script>

Required: the local video element

The SDK publishes from, and previews into, a <video> element with the exact id red5pro-publisher. Add it to the page for every role before calling join():

<video id="red5pro-publisher" autoplay playsinline muted></video>

Without it, publishing fails with a PUBLISH_FAILED event and you never join, even though join() resolves to true. Screen sharing similarly needs <video id="red5pro-publisher-screenshare" autoplay playsinline muted>.

Remote participants are not rendered by the SDK: attach the mediaStream from SUBSCRIBE_SUCCESS to your own <video> elements.

Quick start

You need your deployment's host name (without https://) and a conference token for each participant, generated on your server with the Red5 Backend SDK. The token's uid, roomId and role must match the join() arguments. Serve the page over HTTPS or from localhost.

import { ConferenceClient, ConferenceEvents } from 'red5pro-conference-sdk';

const client = new ConferenceClient({ host: 'userid-000-xxxxxxxxxx.cloud.red5.net' });

// Joined: subscribe to everyone already in the room (keyed by uid)
client.on(ConferenceEvents.USER_PUBLISHED, ({ participants }) => {
  Object.values(participants).forEach(p => client.subscribe(p));
});

// Someone joined later
client.on(ConferenceEvents.NEW_PARTICIPANT, ({ participant }) => client.subscribe(participant));

// Remote media is ready: render it yourself
client.on(ConferenceEvents.SUBSCRIBE_SUCCESS, ({ uid, mediaStream }) => {
  const video = document.createElement('video');
  video.id = `remote-${uid}`;
  video.autoplay = true;
  video.playsInline = true;
  video.srcObject = mediaStream;
  document.body.appendChild(video);
});

client.on(ConferenceEvents.PARTICIPANT_DISCONNECTED, ({ participant }) => {
  document.getElementById(`remote-${participant.uid}`)?.remove();
});

// join() resolves before the connection exists: failures arrive as events
client.on(ConferenceEvents.PUBLISH_FAILED, ({ error }) => console.error('Publish failed:', error));
client.on(ConferenceEvents.JOIN_FAILED, ({ statusCode }) => console.error('Join rejected:', statusCode));
client.on(ConferenceEvents.JOIN_BLOCKED, () => console.error('Blocked from this room'));

// Let the SDK own the local stream
const media = client.mediaStreamManager;
const cameraStream = await media.getMediaStream(true, true);
media.setOriginalStream(cameraStream);
media.setCurrentStream(cameraStream);
const localStream = media.getCurrentStream();
document.getElementById('red5pro-publisher').srcObject = localStream;

await client.join('my-room', 'alice', token, 'publisher', localStream, true, true);

// Later
await client.leave();
client.cleanupChat();

client.on(event, handler) passes the event payload directly. client.addEventListener(event, handler) passes a CustomEvent, with the payload in event.detail.

Examples

The examples folder has one runnable page per feature: basic join, mute controls, screen share, local recording, virtual background, network stats, device switch, chat, guest management and file transfer. Serve the folder with any static server (for example npx serve examples) and open an example from localhost.