Commit graph

280 commits

Author SHA1 Message Date
Matthew Chen
32b87d0e58 Remove custom ringtones. 2018-02-26 14:47:57 -05:00
Matthew Chen
99aedca45f Strip out special casing for pre-iOS 9 users. 2018-02-26 14:13:38 -05:00
Michael Kirk
5f305f844f Send ICE updates immediately after sending CallOffer for faster call
connection.

For legacy reasons, the call sender used to wait until after receiving
the call answer before sending the ICE updates. The primary motivation
was that if the receiving user hadn't accepted a new identity change,
rather than just seeing one "Tap to Accept New Safety Number" messages
for a call, they'd see one for the call offer and then a dozen more as
ICE updates trickled in.

We changed that behavior long ago, and effectively all clients will
avoid that case, while sending ICE updates immediately will allow calls
to connect without having to wait for an additional serialized round
trip between the caller and call recipient.

// FREEBIE
2018-02-23 17:36:07 -05:00
Michael Kirk
e8c5509f3a Respect system contact ringtones
If CallKit privacy is enabled, we'll always use the system default
ringer.

If CallKit privacy is *not* enabled we'll use any ringtone specified in
the for that contact in the address book, else fall back to the default

// FREEBIE
2018-02-23 13:43:23 -05:00
Matthew Chen
5e8f3086de Update call sounds. 2018-02-23 12:53:43 -05:00
Matthew Chen
a0f4723fa2 Update call sounds. 2018-02-23 12:53:43 -05:00
Michael Kirk
d7f8c3e9d3 Ensure inputAccessory doesn't obscure the SN alert
This affects iOS 8, 9, and to a lesser degree iOS10.
On iOS11, presenting an alert causes the keyboard/inputAccessoryView to
temporarily dismiss.

// FREEBIE
2018-02-21 16:35:46 -05:00
Michael Kirk
8dfe06e3f2 Ensure audio session is default after call is terminated.
Previously, we were enabling PlayAndRecord when a call ended due to the
CallService observer's "updateVideoTrack" callbacks.

// FREEBIE
2018-02-18 15:35:37 -05:00
Michael Kirk
6eb1951ee6 Don't stop audio until after CallKit audio session is deactivated
// FREEBIE
2018-02-18 15:35:37 -05:00
Michael Kirk
707ab5f5a8 Minimize changes around call audio activity
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk
4dd1c7813a Instrument calls to ensure audio session is maintained
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk
abb51b565a Don't de-activate audio sesion when other audio activities are happening
// FREEBIE
2018-02-16 14:00:15 -08:00
Michael Kirk
c646f76335 Garther audio concerns, clean up session when done
- sync speakerphone state manipulated from system call screen
  - Revert audio session after call failure, ensures media plays out of
    speaker after placing a failing call.
  - Replace notification with delegate pattern since we're already using
    delegate pattern here.
- Fixes voiceover accessibility after voice memo
- Avoid audio blip after pressing hangup
- Rename CallAudioSession -> OWSAudioSession
  Going to start using it for other non-call things since we want to
  gather all our audio session concerns.
- Resume background audio when done playing video
  - Extract OWSVideoPlayer which ensures audio is in proper state before
    playback
  - Move recording session logic to shared OWSAudioSession
  - Deactivate audio session when complete

// FREEBIE
2018-02-06 18:45:51 -08:00
Michael Kirk
e3469649f7 Fix receiving calls
// FREEBIE
2018-02-02 11:13:57 -08:00
Matthew Chen
e77c3e6717 Retain changes from session database branch. 2018-01-10 12:18:23 -05:00
Matthew Chen
f9ce34f553 Improve background task logic. 2017-12-19 11:05:17 -05:00
Matthew Chen
7a1e47cd26 Add asserts around Swift singletons. 2017-12-07 13:57:45 -05:00
Matthew Chen
9da165b846 Continue conversion of app setup. 2017-12-05 11:19:11 -05:00
Matthew Chen
b4e8df79da Migrate environment to SignalMessaging. 2017-12-05 10:29:29 -05:00
Matthew Chen
8cc33b3de1 Refine loading view of share extension. 2017-12-01 10:48:18 -05:00
Michael Kirk
a11d83187b WIP: Framework-friendly - compiles but crashes on launch
// FREEBIE
2017-11-29 13:58:27 -08:00
Michael Kirk
86c1a3d08a CR: use weak capture
// FREEBIE
2017-11-20 14:41:00 -05:00
Michael Kirk
30b50e1489 Activate audio at the proper time
// FREEBIE
2017-11-20 14:35:16 -05:00
Michael Kirk
81f097c1f5 Don't drop critical data messages
Assigning dataChannel sometimes happens after iceConnect.

Fixes symptom where Alice calls Bob.
Bob answers and sees the call UI as normal
but Alice sees call as continuing to ring

// FREEBIE
2017-11-20 14:35:16 -05:00
Michael Kirk
2e75e9df55 Don't ignore critical errors
// FREEBIE
2017-11-20 14:35:16 -05:00
Michael Kirk
91f25bec3c Remove overzealous assert
// FREEBIE
2017-11-20 14:35:16 -05:00
Michael Kirk
abb57f2a15 App icon for system call screen
On iOS10 there was a default "..." button, but now we need our own.

// FREEBIE
2017-11-20 14:04:04 -05:00
Matthew Chen
fc07c7c04f Respond to CR.
// FREEBIE
2017-11-09 03:14:58 -05:00
Matthew Chen
5cc292fb6c Don't ask for camera permissions if app is not active.
// FREEBIE
2017-11-09 03:02:05 -05:00
Matthew Chen
5e61307ce3 Don't ask for microphone permissions if app is not active.
// FREEBIE
2017-11-09 02:58:51 -05:00
Matthew Chen
f86882b5ff Don't ask for camera permissions if app is not active.
// FREEBIE
2017-11-09 02:57:15 -05:00
Michael Kirk
b77e331732 Unify Mute/Hold audio handling
// FREEBIE
2017-11-02 08:49:46 -04:00
Michael Kirk
c7642cc628 Fix volume burst when call connects
By centralizing AudioSession management onto the AudioService, we can
avoid enabling the RTCAudioSession while we're mid-ring.

Also allows us to centralize and remove redundant audio session logic.

// FREEBIE
2017-11-02 08:49:46 -04:00
Michael Kirk
402d4157c8 Uniform volume when ringing on speakerphone vs video
// FREEBIE
2017-11-02 08:49:46 -04:00
Michael Kirk
36a39caad6 Remove overzealous assert
// FREEBIE
2017-11-02 08:49:46 -04:00
Michael Kirk
dd5a19d1fd Suspend while answering shows "Missed Call"
When awakened by a voip push, we get some arbitrary amount of background
time to connect the call (in practice this is ~30s) before the app is
suspended.

Though we were properly terminating the call upon being suspended, we
were not notifying the user that they had missed a call.

// FREEBIE
2017-10-12 14:34:36 -04:00
Michael Kirk
3d3af21792 CR: clarify comment, proper linewrap
// FREEBIE
2017-10-05 13:02:39 -04:00
Michael Kirk
c3dc8508ab pre-PR cleanup
// FREEBIE
2017-10-05 13:02:38 -04:00
Michael Kirk
39e5875a36 remove overzealous assert 2017-10-05 13:02:38 -04:00
Michael Kirk
ff2f9ebaf0 fix compiling on 32bit.
// FREEBIE
2017-10-05 13:02:38 -04:00
Michael Kirk
f171c56488 Video calls use MetalKit when available
Taking advantage of the new RTCMTLVideoView where available
(64bit && >=iOS9), should help performance (battery and rendering
quality).

// FREEBIE
2017-10-05 13:02:38 -04:00
Matthew Chen
445f6dc6f8 Respond to CR.
// FREEBIE
2017-09-21 17:03:57 -04:00
Matthew Chen
35a2470cb7 Post notifications asynchronously.
// FREEBIE
2017-09-21 17:03:57 -04:00
Matthew Chen
3367292ba0 Merge branch 'hotfix/2.16.1' 2017-09-19 17:25:24 -04:00
Matthew Chen
b6d782046a Normalize conversation presentation logic.
// FREEBIE
2017-09-18 16:08:18 -04:00
Matthew Chen
7b1b532b19 Respond to CR.
// FREEBIE
2017-09-18 16:05:01 -04:00
Matthew Chen
43370ffc3f Fix assert during calls without camera permission.
// FREEBIE
2017-09-18 16:03:03 -04:00
Matthew Chen
e8daf9a8d3 Fix assert when missing camera permission during calls.
// FREEBIE
2017-09-18 16:03:03 -04:00
Michael Kirk
c4139b0f3e Callkit ringer uses profile name
Also presents formatted number instead of e164

// FREEBIE
2017-09-11 10:01:21 -04:00
Michael Kirk
3d9796db77 Debug actions for calling
For testing stale hangup/busy messages

Extracted MessageSender promise API
Moved call debug actions to their own page

// FREEBIE
2017-08-11 09:21:11 -04:00