fixes
This commit is contained in:
parent
2c00de1dd0
commit
6e4ceb9977
11
app.js
11
app.js
@ -5,7 +5,12 @@ const app = express();
|
||||
const Server = require('socket.io');
|
||||
const path = require('node:path');
|
||||
const fs = require('node:fs');
|
||||
const https = require('https');
|
||||
let https = require('https');
|
||||
try {
|
||||
https = require('node:https');
|
||||
} catch (err) {
|
||||
console.log('https support is disabled!');
|
||||
}
|
||||
const mediasoup = require('mediasoup');
|
||||
|
||||
let worker
|
||||
@ -62,8 +67,8 @@ const peers = io.of('/');
|
||||
const createWorker = async () => {
|
||||
try {
|
||||
worker = await mediasoup.createWorker({
|
||||
rtcMinPort: process.env.RTC_MIN_PORT,
|
||||
rtcMaxPort: process.env.RTC_MAX_PORT,
|
||||
rtcMinPort: 2000,
|
||||
rtcMaxPort: 2020,
|
||||
})
|
||||
console.log(`[createWorker] worker pid ${worker.pid}`);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user