Official package · Realtime building blocks
Presence channels with up to 100,000 members
Online counts and member lists for live audiences: the client gets a sample of members and batched join and leave counts instead of every member, and pages through the rest when it needs them.
@hibira-io/large-presencenpm ↗GitHub ↗
- presence-large-* channels hold up to 100,000 members.
- The member count and a member list kept to the size you choose, updated once a second.
- Works with pusher-js and Laravel Echo.
Sign in to see these snippets with your own cluster host. Sign in
Install
npm install @hibira-io/large-presence pusher-jsUse it
import { LargePresence } from '@hibira-io/large-presence'; const pusher = new Pusher('YOUR_APP_KEY', { cluster: 'hkg', wsHost: 'ws.hibira.io', channelAuthorization: { endpoint: '/broadcasting/auth' }, }); const room = LargePresence.subscribe(pusher, 'presence-large-live.42', { maxMembers: 1000 }); room.on('change', ({ count }) => showViewers(count));
Before you start
- Private and presence channels need an auth endpoint on your backend that signs subscriptions with the app secret, as with pusher-js.
Use the app key from your dashboard; the secret stays on your server. Channels, events and authorization endpoints work exactly as they do with Pusher. Create your free account →