同步操作将从 HuskarHuang/mediasoup-demo 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
A demo application of mediasoup v3.
Try it online at https://v3demo.mediasoup.org.
$ git clone https://github.com/versatica/mediasoup-demo.git
$ cd mediasoup-demo
$ git checkout v3
Ensure you have installed the dependencies required by mediasoup to build.
Set up the mediasoup-demo server:
$ cd server
$ npm install
config.example.js
as config.js
and 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.
$ cd app
$ npm install
$ cd server
$ npm start
$ cd app
$ npm start
gulp-cli
NPM module (may need sudo
):$ npm install -g gulp-cli
$ cd app
$ gulp dist
Upload the entire server
folder to your server and make your web server (Apache, Nginx, etc) expose the server/public
folder.
Edit your server/config.js
with appropriate settings (listening IP/port, logging options, valid TLS certificate, etc).
Within your server, run the Node.js application by setting the DEBUG
environment 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 server
folder and running:
$ npm run connect
$ cd server
$ docker/build.sh
$ MEDIASOUP_ANNOUNCED_IP=192.168.1.34 ./docker/run.sh
0.0.0.0
.server/certs
directory with names fullchain.pem
and privkey.pem
.network="host"
mode.MIT
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。