From 3b232a1c3fd23cfd8d08e0646ee0044f32af6264 Mon Sep 17 00:00:00 2001 From: acgist <289547414@qq.com> Date: Mon, 19 Jun 2023 09:01:36 +0800 Subject: [PATCH] =?UTF-8?q?[*]=20=E6=97=A5=E5=B8=B8=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ecosystem.config.cluster.json | 14 ++-- taoyao-client-media/ecosystem.config.json | 10 +-- taoyao-client-media/src/Config.js | 68 +++++++++---------- 3 files changed, 46 insertions(+), 46 deletions(-) diff --git a/taoyao-client-media/ecosystem.config.cluster.json b/taoyao-client-media/ecosystem.config.cluster.json index 2895b1d..e2cb2e0 100644 --- a/taoyao-client-media/ecosystem.config.cluster.json +++ b/taoyao-client-media/ecosystem.config.cluster.json @@ -1,13 +1,13 @@ { "apps": [ { - "cwd": "./", - "name": "taoyao-client-media", - "script": "src/Server.js", - "instances": 2, - "exec_mode": "cluster", - "out_file": "./logs/out.log", - "error_file": "./logs/error.log", + "cwd" : "./", + "name" : "taoyao-client-media", + "script" : "src/Server.js", + "instances" : 2, + "exec_mode" : "cluster", + "out_file" : "./logs/out.log", + "error_file" : "./logs/error.log", "log_date_format": "YYYY-MM-DD HH:mm:ss" } ] diff --git a/taoyao-client-media/ecosystem.config.json b/taoyao-client-media/ecosystem.config.json index c9f3fc3..a4e4746 100644 --- a/taoyao-client-media/ecosystem.config.json +++ b/taoyao-client-media/ecosystem.config.json @@ -1,11 +1,11 @@ { "apps": [ { - "cwd": "./", - "name": "taoyao-client-media", - "script": "src/Server.js", - "out_file": "./logs/out.log", - "error_file": "./logs/error.log", + "cwd" : "./", + "name" : "taoyao-client-media", + "script" : "src/Server.js", + "out_file" : "./logs/out.log", + "error_file" : "./logs/error.log", "log_date_format": "YYYY-MM-DD HH:mm:ss" } ] diff --git a/taoyao-client-media/src/Config.js b/taoyao-client-media/src/Config.js index 5f44af9..d20363d 100644 --- a/taoyao-client-media/src/Config.js +++ b/taoyao-client-media/src/Config.js @@ -74,15 +74,15 @@ module.exports = { mediaCodecs: [ // OPUS PCMA PCMU G722 { - kind: "audio", - mimeType: "audio/opus", + kind : "audio", + mimeType : "audio/opus", clockRate: 48000, - channels: 2, + channels : 2, }, { - kind: "video", - mimeType: "video/VP8", - clockRate: 90000, + kind : "video", + mimeType : "video/VP8", + clockRate : 90000, parameters: { "x-google-start-bitrate": 1000, // "x-google-min-bitrate": 800, @@ -90,38 +90,38 @@ module.exports = { }, }, { - kind: "video", - mimeType: "video/VP9", - clockRate: 90000, + kind : "video", + mimeType : "video/VP9", + clockRate : 90000, parameters: { - "profile-id": 2, + "profile-id" : 2, "x-google-start-bitrate": 1000, // "x-google-min-bitrate": 800, // "x-google-max-bitrate": 1800, }, }, { - kind: "video", - mimeType: "video/h264", - clockRate: 90000, + kind : "video", + mimeType : "video/h264", + clockRate : 90000, parameters: { - "packetization-mode": 1, - "profile-level-id": "4d0032", + "packetization-mode" : 1, + "profile-level-id" : "4d0032", "level-asymmetry-allowed": 1, - "x-google-start-bitrate": 1000, + "x-google-start-bitrate" : 1000, // "x-google-min-bitrate": 800, // "x-google-max-bitrate": 1800, }, }, { - kind: "video", - mimeType: "video/h264", - clockRate: 90000, + kind : "video", + mimeType : "video/h264", + clockRate : 90000, parameters: { - "packetization-mode": 1, - "profile-level-id": "42e01f", + "packetization-mode" : 1, + "profile-level-id" : "42e01f", "level-asymmetry-allowed": 1, - "x-google-start-bitrate": 1000, + "x-google-start-bitrate" : 1000, // "x-google-min-bitrate": 800, // "x-google-max-bitrate": 1800, }, @@ -132,15 +132,15 @@ module.exports = { webRtcServerOptions: { listenInfos: [ { - protocol: "udp", - ip: process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", - port: 44444, + protocol : "udp", + ip : process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", + port : 44444, announcedIp: process.env.MEDIASOUP_ANNOUNCED_IP || defaultTaoyaoHost || "127.0.0.1", }, { - protocol: "tcp", - ip: process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", - port: 44444, + protocol : "tcp", + ip : process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", + port : 44444, announcedIp: process.env.MEDIASOUP_ANNOUNCED_IP || defaultTaoyaoHost || "127.0.0.1", }, ], @@ -149,19 +149,19 @@ module.exports = { webRtcTransportOptions: { listenIps: [ { - ip: process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", + ip : process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", announcedIp: process.env.MEDIASOUP_ANNOUNCED_IP || defaultTaoyaoHost || "127.0.0.1", }, ], initialAvailableOutgoingBitrate: 1000000, minimumAvailableOutgoingBitrate: 800000, - maxSctpMessageSize: 262144, - maxIncomingBitrate: 1800000, + maxSctpMessageSize : 262144, + maxIncomingBitrate : 1800000, }, // PlainTransport配置:https://mediasoup.org/documentation/v3/mediasoup/api/#PlainTransportOptions plainTransportOptions: { listenIp: { - ip: process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", + ip : process.env.MEDIASOUP_LISTEN_IP || "0.0.0.0", announcedIp: process.env.MEDIASOUP_ANNOUNCED_IP || defaultTaoyaoHost || "127.0.0.1", }, maxSctpMessageSize: 262144, @@ -170,8 +170,8 @@ module.exports = { }; /** - * PipeTransport: RTP(router) - * PlainTransport: RTP + * PipeTransport : RTP(router) + * PlainTransport : RTP * DirectTransport: NodeJS * WebRtcTransport: WebRTC */