don't pause timer when call is held

This is also the way it is implemented in web and the correct way
This commit is contained in:
chagai95 2022-05-02 09:11:47 +02:00 committed by GitHub
parent cbc29d0699
commit 5f1aad76e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 9 deletions

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() }
}