Prevent incoming group call to start in audio-only layout if video auto accept policy is disabled, instead enable video with receive only direction
This commit is contained in:
parent
ecc94161ee
commit
c3ce265c78
1 changed files with 18 additions and 2 deletions
|
@ -565,11 +565,27 @@ class CoreContext(
|
||||||
fun answerCall(call: Call) {
|
fun answerCall(call: Call) {
|
||||||
Log.i("[Context] Answering call $call")
|
Log.i("[Context] Answering call $call")
|
||||||
val params = core.createCallParams(call)
|
val params = core.createCallParams(call)
|
||||||
params?.recordFile = LinphoneUtils.getRecordingFilePathForAddress(call.remoteAddress)
|
if (params == null) {
|
||||||
|
Log.w("[Context] Answering call without params!")
|
||||||
|
call.accept()
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
params.recordFile = LinphoneUtils.getRecordingFilePathForAddress(call.remoteAddress)
|
||||||
|
|
||||||
if (LinphoneUtils.checkIfNetworkHasLowBandwidth(context)) {
|
if (LinphoneUtils.checkIfNetworkHasLowBandwidth(context)) {
|
||||||
Log.w("[Context] Enabling low bandwidth mode!")
|
Log.w("[Context] Enabling low bandwidth mode!")
|
||||||
params?.isLowBandwidthEnabled = true
|
params.isLowBandwidthEnabled = true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (call.callLog.wasConference()) {
|
||||||
|
// Prevent incoming group call to start in audio only layout
|
||||||
|
// Do the same as the conference waiting room
|
||||||
|
params.isVideoEnabled = true
|
||||||
|
params.videoDirection = if (core.videoActivationPolicy.automaticallyInitiate) MediaDirection.SendRecv else MediaDirection.RecvOnly
|
||||||
|
Log.i("[Context] Enabling video on call params to prevent audio-only layout when answering")
|
||||||
|
}
|
||||||
|
|
||||||
call.acceptWithParams(params)
|
call.acceptWithParams(params)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue