|
|
@ -339,7 +339,6 @@ class PeerConnectionClient: NSObject, RTCPeerConnectionDelegate, RTCDataChannelD
|
|
|
|
|
|
|
|
|
|
|
|
return setRemoteSessionDescription(remoteDescription)
|
|
|
|
return setRemoteSessionDescription(remoteDescription)
|
|
|
|
.then(on: PeerConnectionClient.signalingQueue) {
|
|
|
|
.then(on: PeerConnectionClient.signalingQueue) {
|
|
|
|
assert(self.peerConnection != nil)
|
|
|
|
|
|
|
|
return self.negotiateAnswerSessionDescription(constraints: constraints)
|
|
|
|
return self.negotiateAnswerSessionDescription(constraints: constraints)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -369,6 +368,12 @@ class PeerConnectionClient: NSObject, RTCPeerConnectionDelegate, RTCDataChannelD
|
|
|
|
return Promise { fulfill, reject in
|
|
|
|
return Promise { fulfill, reject in
|
|
|
|
assertOnSignalingQueue()
|
|
|
|
assertOnSignalingQueue()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
guard self.peerConnection != nil else {
|
|
|
|
|
|
|
|
Logger.debug("\(self.TAG) \(#function) Ignoring obsolete event in terminated client")
|
|
|
|
|
|
|
|
reject(NSError(domain:"Obsolete client", code:0, userInfo:nil))
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
Logger.debug("\(self.TAG) negotiating answer session.")
|
|
|
|
Logger.debug("\(self.TAG) negotiating answer session.")
|
|
|
|
|
|
|
|
|
|
|
|
peerConnection.answer(for: constraints, completionHandler: { (sdp: RTCSessionDescription?, error: Error?) in
|
|
|
|
peerConnection.answer(for: constraints, completionHandler: { (sdp: RTCSessionDescription?, error: Error?) in
|
|
|
|