A demo application of mediasoup v3.
Try it online at https://v3demo.mediasoup.org.
- mediasoup website and documentation: mediasoup.org
- mediasoup support forum: mediasoup.discourse.group
- Clone the project:
$ git clone https://github.com/versatica/mediasoup-demo.git $ cd mediasoup-demo $ git checkout v3
- Set up the server:
$ cd server $ npm install
config.jsand customize it for your scenario:
$ cp config.example.js config.js
NOTE: To be perfectly clear, "customize it for your scenario" is not something "optional". If you don't set proper values in
config.js the application won't work.
- Set up the browser app:
$ cd app $ npm install
Run it locally
- Run the Node.js server application in a terminal:
$ cd server $ npm start
- In a different terminal build and run the browser application:
$ cd app $ npm start
Deploy it in a server
- Globally install
gulp-cliNPM module (may need
$ npm install -g gulp-cli
- Build the production ready browser application:
$ cd app $ gulp dist
Upload the entire
serverfolder to your server and make your web server (Apache, Nginx, etc) expose the
server/config.jswith appropriate settings (listening IP/port, logging options, valid TLS certificate, etc).
Within your server, run the Node.js application by setting the
DEBUGenvironment variable according to your needs (more info):
$ DEBUG="*mediasoup* *ERROR* *WARN*" node server.js
If you wish to run it as daemon/service you can use pm2 process manager. Or you can dockerize it among other options.
The Node.js application exposes an interactive terminal. When running as daemon (in background) the host administrator can connect to it by entering into the
serverfolder and running:
$ npm run connect