@ -268,6 +268,16 @@ define(['jquery', 'underscore', 'webrtc.adapter'], function($, _) {
};
PeerConnection.prototype.hasRemoteDescription = function() {
// NOTE(longsleep): Chrome seems to return empty sdp even if no remoteDescription was set.
if (!this.pc || !this.pc.remoteDescription || !this.pc.remoteDescription.sdp) {
return false
}
return true;
PeerConnection.prototype.setRemoteDescription = function() {
return this.pc.setRemoteDescription.apply(this.pc, arguments);
@ -237,7 +237,7 @@ function($, _, PeerCall, PeerConference, PeerXfer, PeerScreenshare, UserMedia, u
console.log("Offer process.");
targetcall = this.findTargetCall(from);
if (targetcall) {
if (!this.settings.renegotiation && targetcall.peerconnection && targetcall.peerconnection.pc && targetcall.peerconnection.pc.remoteDescription) {
if (!this.settings.renegotiation && targetcall.peerconnection && targetcall.peerconnection.hasRemoteDescription()) {
// Call replace support without renegotiation.
this.doHangup("unsupported", from);
console.error("Processing new offers is not implemented without renegotiation.");