1
我不能使用以下方法。如何關閉webrtc數據通道?
由於我只使用datachannel(不使用getUserMedia)
<script>
peerConnection.removeStream(remoteStream)
remoteVideo.onerror = null;
remoteVideo.pause();
remoteVideo.src = undefined;
remoteStream.stop();
remoteStream.onended = null;
remoteStream = null;
peerConnection.removeStream(localStream)
localVideo.onerror = null;
localVideo.pause();
localVideo.src = undefined;
localStream.stop();
localStream.onended = null;
localStream = null;
</script>
有沒有一種方法來關閉一個數據通道?
你能澄清到底發生了什麼問題嗎?如果你不使用媒體,只有數據通道,你爲什麼要刪除流和暫停視頻元素? – xdumaine