sctp默认参数

This commit is contained in:
2023-10-19 02:26:29 +08:00
parent 1211efae37
commit 23a0c60ad0
1 changed files with 10 additions and 0 deletions

View File

@ -66,6 +66,16 @@ export default class ClientList {
iceCandidatePoolSize: 10, // 限制 ICE 候选者的数量 iceCandidatePoolSize: 10, // 限制 ICE 候选者的数量
iceTransportPolicy: 'all', // 使用所有可用的候选者 iceTransportPolicy: 'all', // 使用所有可用的候选者
bundlePolicy: 'max-bundle',// 将所有媒体流捆绑在一起,以最大程度地提高性能和减少延迟 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 }) => { webrtc.ondatachannel = ({ channel }) => {
console.debug(data.name, '建立', channel.label, '数据通道') console.debug(data.name, '建立', channel.label, '数据通道')