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, '数据通道')