Implement call holding (call swapping still broken).

- Alice calls Bob on Signal and they start talking
- Charlie calls Alice on Not-Signal.
- Alice chooses to "Hold & Accept" putting Bob on Hold while the call with
  Charlie connects.
- If Alice ends the call with Charlie, we're back in Signal-iOS and
  talking to Bob, no problem.
- However, if, before ending the call with Charlie, Alice tries to swap
  *back* to bob, bob won't hear any audio in the callkit screen. Alice
  has to switch back to the Signal screen before the audio is transmitted.

// FREEBIE
pull/1/head
Michael Kirk 8 years ago
parent e425d351c7
commit 969b73cad8

@ -133,6 +133,8 @@ protocol CallObserver: class {
} }
} }
var isOnHold = false
var connectedDate: NSDate? var connectedDate: NSDate?
var error: CallError? var error: CallError?

@ -285,20 +285,19 @@ final class CallKitCallUIAdaptee: NSObject, CallUIAdaptee, CXProviderDelegate {
action.fail() action.fail()
return return
} }
Logger.warn("TODO, unimplemented set held call: \(call)")
// TODO FIXME // Update the SignalCall's underlying hold state.
// // Update the SpeakerboxCall's underlying hold state. call.isOnHold = action.isOnHold
// call.isOnHold = action.isOnHold
// // Stop or start audio in response to holding or unholding the call.
// // Stop or start audio in response to holding or unholding the call. if call.isOnHold {
// if call.isOnHold { // stopAudio() <-- SpeakerBox
// // stopAudio() <-- SpeakerBox PeerConnectionClient.stopAudioSession()
// PeerConnectionClient.stopAudioSession() } else {
// } else { // startAudio() <-- SpeakerBox
// // startAudio() <-- SpeakerBox // This is redundant with what happens in `provider(_:didActivate:)`
//PeerConnectionClient.startAudioSession() //PeerConnectionClient.startAudioSession()
// } }
// Signal to the system that the action has been successfully performed. // Signal to the system that the action has been successfully performed.
action.fulfill() action.fulfill()

Loading…
Cancel
Save