Merge pull request #5885 from chagai95/patch-2
don't pause timer when call is held
This commit is contained in:
commit
a11c0b7ea1
|
@ -0,0 +1 @@
|
||||||
|
Don't pause timer when call is held.
|
|
@ -670,15 +670,11 @@ class WebRtcCall(
|
||||||
isRemoteOnHold = true
|
isRemoteOnHold = true
|
||||||
isLocalOnHold = true
|
isLocalOnHold = true
|
||||||
direction = RtpTransceiver.RtpTransceiverDirection.SEND_ONLY
|
direction = RtpTransceiver.RtpTransceiverDirection.SEND_ONLY
|
||||||
timer.pause()
|
|
||||||
} else {
|
} else {
|
||||||
isRemoteOnHold = false
|
isRemoteOnHold = false
|
||||||
isLocalOnHold = wasLocalOnHold
|
isLocalOnHold = wasLocalOnHold
|
||||||
onCallBecomeActive(this@WebRtcCall)
|
onCallBecomeActive(this@WebRtcCall)
|
||||||
direction = RtpTransceiver.RtpTransceiverDirection.SEND_RECV
|
direction = RtpTransceiver.RtpTransceiverDirection.SEND_RECV
|
||||||
if (!isLocalOnHold) {
|
|
||||||
timer.resume()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (transceiver in peerConnection?.transceivers ?: emptyList()) {
|
for (transceiver in peerConnection?.transceivers ?: emptyList()) {
|
||||||
transceiver.direction = direction
|
transceiver.direction = direction
|
||||||
|
@ -941,11 +937,6 @@ class WebRtcCall(
|
||||||
wasLocalOnHold = nowOnHold
|
wasLocalOnHold = nowOnHold
|
||||||
if (prevOnHold != nowOnHold) {
|
if (prevOnHold != nowOnHold) {
|
||||||
isLocalOnHold = nowOnHold
|
isLocalOnHold = nowOnHold
|
||||||
if (nowOnHold) {
|
|
||||||
timer.pause()
|
|
||||||
} else {
|
|
||||||
timer.resume()
|
|
||||||
}
|
|
||||||
listeners.forEach {
|
listeners.forEach {
|
||||||
tryOrNull { it.onHoldUnhold() }
|
tryOrNull { it.onHoldUnhold() }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue