4.1.1 • Published 6 months ago

mediasoup-cluster v4.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
6 months ago

Mediasoup cluster

Cluster uses PostgreSQL server to save data of slave servers

                                                           +----------------+
        +-----------------+          webrtc                |  slave server  |
        | producer client |------------------------------->|  for producer  |
        +-----------------+                                +----------------+
                  |                                             ^      |
                  |                +---------------+            |      |
                  +--------------->|               |------------+      | mediasoup
                       http        | master server |   http            |   pipe
                  +--------------->|               |------------+      | transport
                  |                +---------------+            |      |
                  |                                             v      v
                  |                                        +----------------+
        +-----------------+                                |  slave server  |
        | consumer client |<-------------------------------|  for consumer  |
        +-----------------+         webrtc                 +----------------+

Quickstart

Build code (must use node v18+)

npm install
npm run build

Copy env.dev file to .env

cp .env.dev .env

Update config in .env file. Detail in example

// your PostgreSQL server info
DATABASE_URL = "postgresql://postgres:123456@localhost:5432/mediasoup"
...
// your ip in internet network
// https://mediasoup.org/documentation/v3/mediasoup/api/#TransportListenIp
MEDIASOUP_WEBRTC_TRANSPORT_LISTEN_IPS = '[
   {
      "ip": "192.168.6.143",
      "announcedIp": null
   }
]'

Create a master server

npm run start:master

Create a slave server to produce

npm run start:slave:producer

Create a slave server to consume

npm run start:slave:consumer

Run demo app

cd examples/rooms/
npm install
npm run dev

Then, navigate to https://localhost:4430

Documentation

Master server API

License

mediasoup-cluster is MIT Licensed.

4.1.0

6 months ago

4.1.1

6 months ago

4.0.0

8 months ago

3.1.0

10 months ago

3.0.0

10 months ago

2.0.0

10 months ago

1.2.0

11 months ago

1.1.0

11 months ago

1.0.0

11 months ago