Restart video previow upon rotation to avoid crash

This commit is contained in:
Christophe Deschamps 2022-11-28 16:26:17 +01:00
parent ad9163320c
commit a74d042a6a

View file

@ -218,6 +218,11 @@ import linphonesw
override func didRotate(from fromInterfaceOrientation: UIInterfaceOrientation) {
super.didRotate(from: fromInterfaceOrientation)
self.layoutRotatableElements()
Core.get().videoPreviewEnabled = ConferenceWaitingRoomViewModel.sharedModel.isVideoEnabled.value == true
}
override func willRotate(to toInterfaceOrientation: UIInterfaceOrientation, duration: TimeInterval) {
Core.get().videoPreviewEnabled = false
}
override func viewWillAppear(_ animated: Bool) {