WEBRTC对象#<;RTPEERCONNECTION>;没有方法';处理信号消息';
我对WebRTC有问题: 我使用了一个关于视频通话的示例中的代码WEBRTC对象#<;RTPEERCONNECTION>;没有方法';处理信号消息';,webrtc,Webrtc,我对WebRTC有问题: 我使用了一个关于视频通话的示例中的代码 if (new_connection) { console.log('New Peer Connection'); var peer_connection = {}; peer_connection.connection_id = msg.from_connection_id; peer_connection.pc = createPeerConnection(peer_c
if (new_connection) {
console.log('New Peer Connection');
var peer_connection = {};
peer_connection.connection_id = msg.from_connection_id;
peer_connection.pc = createPeerConnection(peer_connection.connection_id,
false);
peer_connections.push(peer_connection);
$('#remote').prepend(remoteVideoHtml.replace('remoteVideoId', 'peer' +
peer_connection.connection_id));
}
//Now process the SDP JSON Blob received
for (var i in peer_connections) {
if (peer_connections[i].connection_id == msg.from_connection_id) {
try {
peer_connections[i].pc.processSignalingMessage(msg.data);
}catch (e) {
console.log("Failed to create processSignalingMessage, exception: " + e.message);
}
我需要帮助,因为我这里有一个问题
peer_connections[i].pc.processSignalingMessage(msg.data);
问题是:
Object #<RTCPeerConnection> has no method 'processSignalingMessage'
我将非常感谢您的帮助。Chrome中WebRTC的初始版本是基于ROAP的,它过去有一个
ProcessSignalingMessage()
方法。当前版本基于JSEP,它具有类似或的方法来注入本地SDP和从其他用户接收的SDP
您仍然可以在Chrome的旧版本或Bowser中找到此实现。Chrome中WebRTC的初始版本基于ROAP,并且它过去有一个
ProcessSignalingMessage()
方法。当前版本基于JSEP,它具有类似或的方法来注入本地SDP和从其他用户接收的SDP
您仍然可以在Chrome的旧版本或Bowser中找到此实现
pc.onconnecting = function (msg) {
console.log('onSessionConnecting');
}
pc.onopen = function (msg) {
console.log('onSessionOpened');
}
pc.onaddstream = function (event) {
console.log('onRemoteStreamAdded add the remote peers video stream.');
var url = webkitURL.createObjectURL(event.stream);
$('#peer' + connection_id).attr({
src: url
});
}