0
我想用的WebRTC實現對等網絡音頻會議網狀拓撲結構實現的WebRTC對等網絡音頻會議。我試過RTCMultiConnection.js來實現,但是面對一些問題在網絡外部(NAT外部)播放。我試圖設置STUN和TURN,但問題依然存在。出現錯誤爲「ICE連接失敗,重新連接對等連接」。如何使用RTCMultiConnection
STUN和TURN配置如下:
function initRTCMultiConnection(userid) {
var connection = new RTCMultiConnection();
connection.body = document.getElementById('videos-container');
connection.channel = connection.sessionid = connection.userid = userid || connection.userid;
connection.sdpConstraints.mandatory = {
OfferToReceiveAudio: false,
OfferToReceiveVideo: true
};
var iceServers = [];
iceServers.push({
url: 'stun:stun.l.google.com:19302'
});
iceServers.push({
url: 'stun:stun.anyfirewall.com:3478'
});
iceServers.push({
url: 'turn:turn.anyfirewall.com:443?transport=tcp',
credential: 'webrtc',
username: 'webrtc'
});
connection.iceServers = iceServers;
我使用的WebRTC-Scalable-Broadcast更新的演示。
請建議我解決它。
是否有任何其他API /庫可供利用的WebRTC建立對等網絡音頻會議?