From 23a0c60ad04629f0c1964a3887baf9d0c9b3fcd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=A7=89?= Date: Thu, 19 Oct 2023 02:26:29 +0800 Subject: [PATCH] =?UTF-8?q?sctp=E9=BB=98=E8=AE=A4=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/client.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/client.js b/src/client.js index 91818cf..3aadeea 100644 --- a/src/client.js +++ b/src/client.js @@ -66,6 +66,16 @@ export default class ClientList { iceCandidatePoolSize: 10, // 限制 ICE 候选者的数量 iceTransportPolicy: 'all', // 使用所有可用的候选者 bundlePolicy: 'max-bundle',// 将所有媒体流捆绑在一起,以最大程度地提高性能和减少延迟 + sctp: { + maxMessageSize: 1024 * 64, // 64KB + maxRetransmits: 10, // 最大重传次数 + maxPacketLifeTime: 3000, // 最大生存时间 + renegotiationTimeout: 1000, // 重协商超时时间 + redeliveryTimeout: 1000, // 重传超时时间 + redeliveryTime: 1000, // 重传时间 + reliability: 'reliable', // 可靠传输 + ordered: true, // 有序传输 + } }) webrtc.ondatachannel = ({ channel }) => { console.debug(data.name, '建立', channel.label, '数据通道')