From 6e4ceb997786ef9456d8c31241f9f6959cf8f956 Mon Sep 17 00:00:00 2001 From: Sergiu Toma Date: Tue, 18 Oct 2022 18:18:29 +0300 Subject: [PATCH] fixes --- app.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app.js b/app.js index 5261f57..6c37748 100644 --- a/app.js +++ b/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}`);