mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Fix video display in call view
This commit is contained in:
parent
2f1bd572b0
commit
937444c5d0
2 changed files with 8 additions and 9 deletions
|
|
@ -82,7 +82,7 @@ struct CallView: View {
|
|||
Button {
|
||||
callViewModel.toggleVideo()
|
||||
} label: {
|
||||
Image(callViewModel.cameraDisplayed ? "video-camera" : "video-camera-slash")
|
||||
Image(telecomManager.remoteVideo ? "video-camera" : "video-camera-slash")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle((callViewModel.isPaused || telecomManager.isPausedByRemote) ? Color.gray500 : .white)
|
||||
|
|
@ -500,7 +500,7 @@ struct CallView: View {
|
|||
|
||||
Spacer()
|
||||
|
||||
if callViewModel.cameraDisplayed {
|
||||
if telecomManager.remoteVideo {
|
||||
Button {
|
||||
callViewModel.switchCamera()
|
||||
} label: {
|
||||
|
|
@ -594,10 +594,12 @@ struct CallView: View {
|
|||
.scaledToFill()
|
||||
.clipped()
|
||||
.onTapGesture {
|
||||
fullscreenVideo.toggle()
|
||||
if telecomManager.remoteVideo {
|
||||
fullscreenVideo.toggle()
|
||||
}
|
||||
}
|
||||
|
||||
if callViewModel.cameraDisplayed {
|
||||
if telecomManager.remoteVideo {
|
||||
HStack {
|
||||
Spacer()
|
||||
VStack {
|
||||
|
|
@ -741,7 +743,7 @@ struct CallView: View {
|
|||
Button {
|
||||
callViewModel.toggleVideo()
|
||||
} label: {
|
||||
Image(callViewModel.cameraDisplayed ? "video-camera" : "video-camera-slash")
|
||||
Image(telecomManager.remoteVideo ? "video-camera" : "video-camera-slash")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle((callViewModel.isPaused || telecomManager.isPausedByRemote) ? Color.gray500 : .white)
|
||||
|
|
@ -825,7 +827,7 @@ struct CallView: View {
|
|||
Button {
|
||||
callViewModel.toggleVideo()
|
||||
} label: {
|
||||
Image(callViewModel.cameraDisplayed ? "video-camera" : "video-camera-slash")
|
||||
Image(telecomManager.remoteVideo ? "video-camera" : "video-camera-slash")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle((callViewModel.isPaused || telecomManager.isPausedByRemote) ? Color.gray500 : .white)
|
||||
|
|
|
|||
|
|
@ -75,7 +75,6 @@ class CallViewModel: ObservableObject {
|
|||
|
||||
//self.avatarModel = ???
|
||||
self.micMutted = self.currentCall!.microphoneMuted
|
||||
self.cameraDisplayed = self.currentCall!.cameraEnabled == true
|
||||
self.isRecording = self.currentCall!.params!.isRecording
|
||||
self.isPaused = self.isCallPaused()
|
||||
self.timeElapsed = 0
|
||||
|
|
@ -139,8 +138,6 @@ class CallViewModel: ObservableObject {
|
|||
"[CallViewModel] Updating call with video enabled set to \(params.videoEnabled)"
|
||||
)
|
||||
try self.currentCall!.update(params: params)
|
||||
|
||||
self.cameraDisplayed = self.currentCall!.cameraEnabled == true
|
||||
} catch {
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue