[mirotalksfu] - improve config.template

هذا الالتزام موجود في:
Miroslav Pejic
2024-12-20 16:04:35 +01:00
الأصل 6f3c3681b3
التزام c9cee7beae
5 ملفات معدلة مع 26 إضافات و15 حذوفات

عرض الملف

@@ -55,7 +55,7 @@ dev dependencies: {
* @license For commercial or closed source, contact us at license.mirotalk@gmail.com or purchase directly via CodeCanyon
* @license CodeCanyon: https://codecanyon.net/item/mirotalk-sfu-webrtc-realtime-video-conferences/40769970
* @author Miroslav Pejic - miroslav.pejic.85@gmail.com
* @version 1.6.52
* @version 1.6.53
*
*/

عرض الملف

@@ -31,6 +31,17 @@ const IPv4 = getIPv4(); // Replace with the appropriate IPv4 address for your en
const numWorkers = require('os').cpus().length;
/*
Port range for WebRTC communication (40000-40100).
Used for dynamic allocation of UDP ports for media streams.
Can handle up to 50 concurrent participants (2 ports per participant: 1 for audio, 1 for video).
If more participants are needed, increase the port range.
When using Docker, consider using 'network mode: host' for better performance.
Alternatively, try 'webRtcServerActive: true' mode for better scalability.
*/
const rtcMinPort = 40000;
const rtcMaxPort = 40100;
module.exports = {
console: {
/*
@@ -540,8 +551,8 @@ module.exports = {
// Worker settings
numWorkers: numWorkers,
worker: {
rtcMinPort: 40000,
rtcMaxPort: 40100,
rtcMinPort: rtcMinPort,
rtcMaxPort: rtcMaxPort,
disableLiburing: false, // https://github.com/axboe/liburing
logLevel: 'error',
logTags: ['info', 'ice', 'dtls', 'rtp', 'srtp', 'rtcp', 'rtx', 'bwe', 'score', 'simulcast', 'svc', 'sctp'],
@@ -602,38 +613,38 @@ module.exports = {
webRtcServerActive: false,
webRtcServerOptions: {
listenInfos: [
// { protocol: 'udp', ip: '0.0.0.0', announcedAddress: IPv4, port: 40000 },
// { protocol: 'tcp', ip: '0.0.0.0', announcedAddress: IPv4, port: 40000 },
// { protocol: 'udp', ip: '0.0.0.0', announcedAddress: IPv4, port: rtcMinPort },
// { protocol: 'tcp', ip: '0.0.0.0', announcedAddress: IPv4, port: rtcMinPort },
{
protocol: 'udp',
ip: '0.0.0.0',
announcedAddress: IPv4,
portRange: { min: 40000, max: 40000 + numWorkers },
portRange: { min: rtcMinPort, max: rtcMinPort + numWorkers },
},
{
protocol: 'tcp',
ip: '0.0.0.0',
announcedAddress: IPv4,
portRange: { min: 40000, max: 40000 + numWorkers },
portRange: { min: rtcMinPort, max: rtcMinPort + numWorkers },
},
],
},
// WebRtcTransportOptions
webRtcTransport: {
listenInfos: [
// { protocol: 'udp', ip: IPv4, portRange: { min: 40000, max: 40100 } },
// { protocol: 'tcp', ip: IPv4, portRange: { min: 40000, max: 40100 } },
// { protocol: 'udp', ip: IPv4, portRange: { min: rtcMinPort, max: rtcMaxPort } },
// { protocol: 'tcp', ip: IPv4, portRange: { min: rtcMinPort, max: rtcMaxPort } },
{
protocol: 'udp',
ip: '0.0.0.0',
announcedAddress: IPv4,
portRange: { min: 40000, max: 40100 },
portRange: { min: rtcMinPort, max: rtcMaxPort },
},
{
protocol: 'tcp',
ip: '0.0.0.0',
announcedAddress: IPv4,
portRange: { min: 40000, max: 40100 },
portRange: { min: rtcMinPort, max: rtcMaxPort },
},
],
initialAvailableOutgoingBitrate: 1000000,