我得到了一个RTCPeerConnection,当连接建立时,我想要断开与web服务器的连接。
如何检查已建立的连接?
readyState一直是undefined,onopen从来没有被解雇过。
发布于 2013-08-06 03:39:24
readyState来自于该标准的早期版本。现在您可以通过 callback和查询PeerConnection.iceConnectionState来确定这一点。您要寻找的状态值可能是connected。
发布于 2013-08-05 21:30:54
我不确定,这是给你的吗?
if (typeof RTCPeerConnection == "undefined") {
Abort("RTCPeerConnection is not supported/enabled in this browser, cannot test!");
}或者可能设置为null值来断开连接?
RTCPeerConnection = null;https://stackoverflow.com/questions/18067916
复制相似问题