webrtc-signal-http-publisher

1.1.0 • Public • Published

webrtc-signal-http-publisher

Build Status Greenkeeper badge

publish the status from webrtc-signal-http servers.

Configuration

Note: the following configuration values should be set in environment variables

  • WEBRTC_PUBLISH_URI - The uri that we will POST json data to when the state of the world changes.

Why?

You may wish to observe the state of the world. This module enables that!

It does so by hooking on the addPeer:post and removePeer:post events on a peerList attached to a router (if it's a new peerList) or by hooking the /sign_in and /sign_out requests (if it's an old peerList). When the hook is fired, we emit the following message:

{
    "totalClients": number,
    "totalSlots": number,
    "servers": {
        "<id>": {
            "slots": number,
            "ip": string
        },
        ...
    }
}

As documented here. Please note, the ip value will only be present if express is able to detect the ip, and there is a current socket open to the signaling server.

License

MIT

Readme

Keywords

Package Sidebar

Install

npm i webrtc-signal-http-publisher

Weekly Downloads

1

Version

1.1.0

License

MIT

Unpacked Size

9.93 kB

Total Files

6

Last publish

Collaborators

  • b3ngr33ni3r