我不能使用以下方法。
因为我只使用数据通道(不使用 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>
有没有办法关闭数据通道?