mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-17 11:28:06 +00:00
Try to fix video issue when starting video call and video is declined when answered by remote end
This commit is contained in:
parent
7dcaf15e68
commit
7f6c2ba331
1 changed files with 4 additions and 4 deletions
|
|
@ -359,7 +359,7 @@ class CurrentCallViewModel
|
|||
}
|
||||
}
|
||||
isVideoEnabled.postValue(videoEnabled)
|
||||
updateVideoDirection(call.currentParams.videoDirection)
|
||||
updateVideoDirection(call.currentParams.videoDirection, skipIfNotStreamsRunning = true)
|
||||
|
||||
if (call.state == Call.State.Connected) {
|
||||
updateCallDuration()
|
||||
|
|
@ -1161,7 +1161,7 @@ class CurrentCallViewModel
|
|||
)
|
||||
} else {
|
||||
isVideoEnabled.postValue(call.currentParams.isVideoEnabled)
|
||||
updateVideoDirection(call.currentParams.videoDirection)
|
||||
updateVideoDirection(call.currentParams.videoDirection, skipIfNotStreamsRunning = true)
|
||||
}
|
||||
|
||||
if (ActivityCompat.checkSelfPermission(
|
||||
|
|
@ -1286,9 +1286,9 @@ class CurrentCallViewModel
|
|||
}
|
||||
|
||||
@WorkerThread
|
||||
private fun updateVideoDirection(direction: MediaDirection) {
|
||||
private fun updateVideoDirection(direction: MediaDirection, skipIfNotStreamsRunning: Boolean = false) {
|
||||
val state = currentCall.state
|
||||
if (state != Call.State.StreamsRunning) {
|
||||
if (skipIfNotStreamsRunning && state != Call.State.StreamsRunning) {
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue