diff --git a/Ring/Ring/Calls/CallViewModel.swift b/Ring/Ring/Calls/CallViewModel.swift index 299fc44977c304058476f550c28bded23ede01fb..4d5601861833e3174850fbc009c82e9b8e3ed73a 100644 --- a/Ring/Ring/Calls/CallViewModel.swift +++ b/Ring/Ring/Calls/CallViewModel.swift @@ -509,6 +509,7 @@ class CallViewModel: Stateable, ViewModel { func switchCamera() { self.videoService.switchCamera() + videoService.setCameraOrientation(orientation: UIDevice.current.orientation, forceUpdate: true) } func switchSpeaker() { diff --git a/Ring/Ring/Services/VideoService.swift b/Ring/Ring/Services/VideoService.swift index 6569f027ddc37e9c63fb2a5ecae68793eabff6ab..2f79eca599cba49b1734f8e4bc8151872bf9ab5e 100644 --- a/Ring/Ring/Services/VideoService.swift +++ b/Ring/Ring/Services/VideoService.swift @@ -380,7 +380,7 @@ class VideoService: FrameExtractorDelegate { }).disposed(by: self.disposeBag) } - func setCameraOrientation(orientation: UIDeviceOrientation) { + func setCameraOrientation(orientation: UIDeviceOrientation, forceUpdate: Bool = false) { var newOrientation: AVCaptureVideoOrientation switch orientation { case .portrait: @@ -394,7 +394,7 @@ class VideoService: FrameExtractorDelegate { default: newOrientation = AVCaptureVideoOrientation.portrait } - if newOrientation == self.currentOrientation { + if newOrientation == self.currentOrientation && !forceUpdate { self.log.warning("no orientation change required") return }