mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Set videoEnabled to false when audio call starts
This commit is contained in:
parent
ec44690cfe
commit
2b79b95079
2 changed files with 21 additions and 13 deletions
|
|
@ -254,8 +254,12 @@ class TelecomManager: ObservableObject {
|
|||
lcallParams.videoEnabled = false
|
||||
}*/
|
||||
} else {
|
||||
lcallParams.videoEnabled = true
|
||||
lcallParams.videoDirection = isVideo ? MediaDirection.SendRecv : MediaDirection.Inactive
|
||||
if isVideo {
|
||||
lcallParams.videoEnabled = true
|
||||
lcallParams.videoDirection = MediaDirection.SendRecv
|
||||
} else {
|
||||
lcallParams.videoEnabled = false
|
||||
}
|
||||
}
|
||||
|
||||
if let call = core.inviteAddressWithParams(addr: addr, params: lcallParams) {
|
||||
|
|
|
|||
|
|
@ -699,17 +699,21 @@ class CallViewModel: ObservableObject {
|
|||
do {
|
||||
let params = try core.createCallParams(call: self.currentCall)
|
||||
|
||||
params.videoEnabled = true
|
||||
|
||||
if params.videoEnabled {
|
||||
if params.videoDirection == .SendRecv {
|
||||
params.videoDirection = .RecvOnly
|
||||
} else if params.videoDirection == .RecvOnly {
|
||||
params.videoDirection = .SendRecv
|
||||
} else if params.videoDirection == .SendOnly {
|
||||
params.videoDirection = .Inactive
|
||||
} else if params.videoDirection == .Inactive {
|
||||
params.videoDirection = .SendRecv
|
||||
if (params.videoEnabled == false) {
|
||||
Log.info("\(CallViewModel.TAG) Conference found and video disabled in params, enabling it")
|
||||
params.videoEnabled = true
|
||||
params.videoDirection = MediaDirection.SendRecv
|
||||
} else {
|
||||
if (params.videoDirection == MediaDirection.SendRecv || params.videoDirection == MediaDirection.SendOnly) {
|
||||
Log.info(
|
||||
"\(CallViewModel.TAG) Conference found with video already enabled, changing video media direction to receive only"
|
||||
)
|
||||
params.videoDirection = MediaDirection.RecvOnly
|
||||
} else {
|
||||
Log.info(
|
||||
"\(CallViewModel.TAG) Conference found with video already enabled, changing video media direction to send & receive"
|
||||
)
|
||||
params.videoDirection = MediaDirection.SendRecv
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue