我正在尝试实现RTCDataChannel(webRTC)。
它在Firefox中运行得很好,但在chrome中却不行。
Chrome和Firefox都是最新版本。
Chrome中的RTCDataChannel对象:-
RTCDataChannel {
binaryType: "arraybuffer"
bufferedAmount: 0
bufferedAmountLowThreshold: 0
id: 65535
label: "sendDataChannel"
maxRetransmitTime: 65535
maxRetransmits: 65535
negotiated: false
onbufferedamountlow: null
onclose: null
onerror: ƒ (event)
onmessage: ƒ (event)
onopen: ƒ dataChannelStateChanged()
ordered: true
protocol: ""
readyState: "connecting"
reliable: false__proto__:}火狐中的RTCDataChannel对象:
DataChannel {
binaryType: "blob"
id: 0
label: "sendDataChannel",
reliable: true,
readyState: "open",
bufferedAmount: 0,
bufferedAmountLowThreshold: 0,
onopen: dataChannelStateChanged(),
onerror: create_peer_connection/dataChannel.onerror(),
onclose: null,
onmessage: create_peer_connection/dataChannel.onmessage(),
onbufferedamountlow: null
protocol:""
ordered:true}我已经浏览了以下链接:-
请提出这个问题背后的原因是什么铬?
发布于 2017-09-06 13:16:29
我能够使用以下帖子解决这个问题:
WebRTC DataChannel:在火狐上工作,但不使用Chrome
我不得不改变
pc = new RTCPeerConnection(configuration,
{optional: [{RtpDataChannels: true}]});至
pc = new RTCPeerConnection(configuration);https://stackoverflow.com/questions/46075796
复制相似问题