|
|
|
@ -458,6 +458,7 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
self.localVideoConstraints = constraints
|
|
|
|
|
updateCallUI(callState: call.state)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// MARK: - Methods
|
|
|
|
@ -546,12 +547,17 @@ class CallViewController: UIViewController, CallObserver, CallServiceObserver, R
|
|
|
|
|
ongoingCallView.isUserInteractionEnabled = !isRinging
|
|
|
|
|
|
|
|
|
|
// Rework control state if remote video is available.
|
|
|
|
|
contactAvatarView.isHidden = !remoteVideoView.isHidden
|
|
|
|
|
speakerPhoneButton.isHidden = !remoteVideoView.isHidden
|
|
|
|
|
audioModeMuteButton.isHidden = !remoteVideoView.isHidden
|
|
|
|
|
videoModeMuteButton.isHidden = remoteVideoView.isHidden
|
|
|
|
|
audioModeVideoButton.isHidden = !remoteVideoView.isHidden
|
|
|
|
|
videoModeVideoButton.isHidden = remoteVideoView.isHidden
|
|
|
|
|
let hasRemoteVideo = !remoteVideoView.isHidden
|
|
|
|
|
contactAvatarView.isHidden = hasRemoteVideo
|
|
|
|
|
|
|
|
|
|
// Rework control state if local video is available.
|
|
|
|
|
let hasLocalVideo = !localVideoView.isHidden
|
|
|
|
|
for subview in [speakerPhoneButton, audioModeMuteButton, audioModeVideoButton] {
|
|
|
|
|
subview?.isHidden = hasLocalVideo
|
|
|
|
|
}
|
|
|
|
|
for subview in [videoModeMuteButton, videoModeVideoButton] {
|
|
|
|
|
subview?.isHidden = !hasLocalVideo
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// Also hide other controls if user has tapped to hide them.
|
|
|
|
|
if areRemoteVideoControlsHidden && !remoteVideoView.isHidden {
|
|
|
|
|