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 Server = require('socket.io');
|
||||||
const path = require('node:path');
|
const path = require('node:path');
|
||||||
const fs = require('node:fs');
|
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');
|
const mediasoup = require('mediasoup');
|
||||||
|
|
||||||
let worker
|
let worker
|
||||||
@ -62,8 +67,8 @@ const peers = io.of('/');
|
|||||||
const createWorker = async () => {
|
const createWorker = async () => {
|
||||||
try {
|
try {
|
||||||
worker = await mediasoup.createWorker({
|
worker = await mediasoup.createWorker({
|
||||||
rtcMinPort: process.env.RTC_MIN_PORT,
|
rtcMinPort: 2000,
|
||||||
rtcMaxPort: process.env.RTC_MAX_PORT,
|
rtcMaxPort: 2020,
|
||||||
})
|
})
|
||||||
console.log(`[createWorker] worker pid ${worker.pid}`);
|
console.log(`[createWorker] worker pid ${worker.pid}`);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user