Commit graph

15 commits

Author SHA1 Message Date
Michael Kirk 814aec6cdd Recover CallKit state when remote client fails to hangup
Distinguish between localHangup, remoteHangup, and call failure.

This allows us to put CallKit in the proper state, ready to receive new
calls without having a backlog of phantom calls which haven't been
properly removed.

Note the "call error" occurs at the point ICE fails, which takes a
while. Anecdotally, like 10 seconds, which feels like a long to be
talking into the ether.

I briefly considered failing at 'disconnected', which happens much
sooner, but that's actually a recoverable state. E.g. if you toggle
airplane mode you can see that you bounce into `disconnected` and then
back to `connected`, so I don't think we'd want to fail the call as long
as WebRTC considers it "recoverable".

// FREEBIE
2017-01-26 13:18:06 -05:00
Michael Kirk 6c14f2f500 Fix "Answer" from iOS9 notification doesn't init audio
The removed code was from an older eon. CallService shouldn't be touched
except via the CallUIAdapter since only there is the omnipresent
distinction between CallKit vs. NonCallKit made.

i.e. when the RTCAudioSession get's started depends on the
CallUIAdaptee.

// FREEBIE
2017-01-25 12:32:36 -05:00
Michael Kirk 3ee94d57d9 Only NonCallKit adaptee uses manual ringing
- stop executing ringer code on CallKit which manages ringing for us.
- Organize ringing code more clearly.

// FREEBIE
2017-01-24 12:57:02 -05:00
Matthew Chen d4dbe7f44f Disable unused CallKit buttons.
// FREEBIE
2017-01-24 10:04:37 -05:00
Matthew Chen 229d95ecbf Respond to CR.
// FREEBIE
2017-01-24 10:02:03 -05:00
Matthew Chen 9e739433c5 Start work on video.
// FREEBIE
2017-01-23 13:41:59 -05:00
Michael Kirk dbb29d7d7e Don't require recording permissions until call is ringing.
We do this by manually managing the RTCAudioSession.
Unfortunately to do this we have to include a couple of RTC headers not
exported by the default build of WebRTC.framework (see: Libraries/WebRTC)

// FREEBIE
2017-01-17 21:49:13 -05:00
Michael Kirk 8998853aff Move RTCPeerConnectionDelegate to PeerConnectionClient
This makes sense as PeerConnectionClient is our interface to WebRTC

- Makes it easier to test PeerConnectionClient and CallService
- Allows us to shrink CallService class a bit (it's huge)

// FREEBIE
2017-01-17 20:14:33 -05:00
Michael Kirk 1ed39976ee make public protocol method implementations public
responding to CR

// FREEBIE
2017-01-12 13:27:45 -05:00
Michael Kirk f6e6e6b787 CallViewController only accesses CallService via the CallUIAdapter
This is an effort to better define boundaries and simplify
relationships.

This also fixes a theoretical problem where CallKit was showing the in-app
call screen before the call was successfully answered, now we wait until
the action is fulfilled.

// FREEBIE
2017-01-12 13:27:45 -05:00
Michael Kirk 947a637669 Sync "mute" controls between CallKit
In the process, extracted the CallDelegate to allow the
CAllViewController to observe useful call state properties (call.state
and call.isMuted)

// FREEBIE
2017-01-12 13:27:45 -05:00
Michael Kirk c7449db289 remove stubbed audio manager implementation until it's clear what to do
with it.

// FREEBIE
2017-01-12 09:56:09 -05:00
Michael Kirk 9e248168b9 merge CallKitProviderDelegate into CallKitCallUIAdaptee
There was not a clear distinction in responsibilities and mostly the
Adaptee was just delegating to the CKProviderDelegate
2017-01-12 09:56:09 -05:00
Michael Kirk ce3780e44a Wip smashign providerdelgate into UIAdaptee 2017-01-12 09:56:08 -05:00
Michael Kirk 647b2b37e9 WIP: WebRTC calling
* Ensure NotificationsManager has dependencies
    Otherwise it's easy to mess up the order of the required dependencies.
* move AccountManager into Environment, it's heavy to construct

// FREEBIE
2017-01-12 09:56:05 -05:00