Show alert when user tries to activate local video without camera permissions.

// FREEBIE
pull/1/head
Matthew Chen 8 years ago
parent da53368bc2
commit 9a0a7bb6b1

@ -795,8 +795,9 @@ protocol CallServiceObserver: class {
break
}
// TODO: We could also check this whenever the app returns from the background,
// since the user could disable this priviledge at all times.
// We don't need to worry about the user granting or remotinv this permission
// during a call while the app is in the background, because changing this
// permission kills the app.
if authStatus != .authorized {
DispatchQueue.main.async {
let title = NSLocalizedString("CAMERA_PERMISSION_MISSING_TITLE", comment: "Alert title when camera is not authorized")

@ -662,8 +662,6 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
func didPressVideo(sender: UIButton) {
Logger.info("\(TAG) called \(#function)")
let hasLocalVideo = !sender.isSelected
audioModeVideoButton.isSelected = hasLocalVideo
videoModeVideoButton.isSelected = hasLocalVideo
if let call = self.call {
callUIAdapter.setHasLocalVideo(call: call, hasLocalVideo: hasLocalVideo)
} else {

Loading…
Cancel
Save