TODO:
-[x] plumb through AVCaptureSession
-[] get AVCaptureSession from PeerConnectionClient
-[] RTCDataChannel not unwrapped
-[] no member avFoundationSource
-[] no member "back camera"
-[ ] CallScreen
-[x] functional button
-[ ] needs design
-[ ] disable other contact call buttons while in call
-[ ] iOS11
-[x] resize nav content
-[ ] background showing at top of all vc's
-[] iPhoneX
-[x] use differently sized banner for now
-[] mimic X system design
-[ ] iOS10
-[x] resize nav content
-[ ] animation glitch while push/pop
-[ ] iOS9
// FREEBIE
This moves methods more in line with PureLayout conventions.
- Methods always specify if they pin to an edge vs margin
- `margin` is a reserved word which should only refer to layout margins.
i.e. do not use it to refer to "inset" and "offset".
// FREEBIE
callUIAdapter is not a singleton (for better or for worse)
No one should hold a reference directly to it, but rather via the
CallService, which is a singleton
Wait a bit longer for initial call screen before terminating. Especially
first call can hit this limit.
When call *does* take too long to show, terminate properly to ensure
we're not left with a phantom call
// FREEBIE
We've long allowed users to configure what shows up in message
notifications:
- name: content (by default)
- just name (no content)
- generic notification (no name nor content)
Now we're dual purposing that setting to apply to calls. If someone
doesn't want to show names in the message notifications, presumably also
don't want that name showing up in the call log.
Also, since the earlier CallKit/iCloud issues had been addressed before
iOS11, we upgrade all iOS11 users to the more intuitive CallKit
interface.
Also: introduce "use system call logs" toggle when available. It will be
enabled by default, but we disable it for legacy users who'd explicitly
opted *out* of CallKit.
// FREEBIE
- 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
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