Merge pull request #5885 from chagai95/patch-2

don't pause timer when call is held
This commit is contained in:
Benoit Marty 2022-05-04 18:09:11 +02:00 committed by GitHub
commit a11c0b7ea1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 9 deletions

1
changelog.d/5885.bugfix Normal file
View file

@ -0,0 +1 @@
Don't pause timer when call is held.

View file

@ -670,15 +670,11 @@ class WebRtcCall(
isRemoteOnHold = true
isLocalOnHold = true
direction = RtpTransceiver.RtpTransceiverDirection.SEND_ONLY
timer.pause()
} else {
isRemoteOnHold = false
isLocalOnHold = wasLocalOnHold
onCallBecomeActive(this@WebRtcCall)
direction = RtpTransceiver.RtpTransceiverDirection.SEND_RECV
if (!isLocalOnHold) {
timer.resume()
}
}
for (transceiver in peerConnection?.transceivers ?: emptyList()) {
transceiver.direction = direction
@ -941,11 +937,6 @@ class WebRtcCall(
wasLocalOnHold = nowOnHold
if (prevOnHold != nowOnHold) {
isLocalOnHold = nowOnHold
if (nowOnHold) {
timer.pause()
} else {
timer.resume()
}
listeners.forEach {
tryOrNull { it.onHoldUnhold() }
}