RTCPeerConnection DataChannel上的速度限制

时间:2018-11-13 20:51:11

标签: javascript webrtc

是否可以在DataChannel上设置速度/带宽限制?

const pc = new RTCPeerConnection()
const dc = pc.createDataChannel('channel-name')
const offer = await pc.createOffer()
const maxUploadSpeed = 1 << 20 // 1 MiB

// change offer.sdp to set some speed limit

pc.setLocalDescription(offer)

0 个答案:

没有答案