pull/1/head
Michael Kirk 8 years ago committed by Matthew Chen
parent 647b2b37e9
commit 57ad7a2808

@ -466,6 +466,9 @@ fileprivate let timeoutSeconds = 60
terminateCall()
}
/**
* Answer call by call `localId`, used by notification actions which can't serialize a call object.
*/
public func handleAnswerCall(localId: UUID) {
// TODO #function is called from objc, how to access swift defiend dispatch queue (OS_dispatch_queue)
//assertOnSignalingQueue()
@ -529,6 +532,10 @@ fileprivate let timeoutSeconds = 60
handleConnectedCall(call)
}
/**
* Called by initiator when recipient answers the call.
* Called by recipient upon answering the call.
*/
func handleConnectedCall(_ call: SignalCall) {
Logger.debug("\(TAG) in \(#function)")
assertOnSignalingQueue()
@ -827,7 +834,7 @@ fileprivate let timeoutSeconds = 60
self.handleIceConnected()
case .failed:
Logger.warn("\(self.TAG) RTCIceConnection failed.")
guard let thread = self.thread else {
guard self.thread != nil else {
Logger.error("\(self.TAG) refusing to hangup for failed IceConnection because there is no current thread")
return
}

@ -80,8 +80,11 @@ class PeerConnectionClient: NSObject, SignalCallAudioManager {
// MARK: Video
fileprivate func createVideoSender() {
Logger.debug("\(TAG) in \(#function)")
assert(self.videoSender == nil, "\(#function) should only be called once.")
guard !Platform.isSimulator else {
Logger.warn("\(TAG) Refusing to create local video track on simulator.")
Logger.warn("\(TAG) Refusing to create local video track on simulator which has no capture device.")
return
}
@ -119,6 +122,9 @@ class PeerConnectionClient: NSObject, SignalCallAudioManager {
// MARK: Audio
fileprivate func createAudioSender() {
Logger.debug("\(TAG) in \(#function)")
assert(self.audioSender == nil, "\(#function) should only be called once.")
let audioSource = factory.audioSource(with: self.audioConstraints)
let audioTrack = factory.audioTrack(with: audioSource, trackId: Identifiers.audioTrack.rawValue)

Loading…
Cancel
Save