Skip to content

Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.

ios: remove no longer needed code

Saúl Ibarra Corretgé603d16178859
diff --git a/ios/sdk/src/callkit/JMCallKitEmitter.swift b/ios/sdk/src/callkit/JMCallKitEmitter.swift
index b988059b5b..b1e988ea28 100644
--- a/ios/sdk/src/callkit/JMCallKitEmitter.swift
+++ b/ios/sdk/src/callkit/JMCallKitEmitter.swift
@@ -21,7 +21,6 @@ import Foundation
internal final class JMCallKitEmitter: NSObject, CXProviderDelegate {
private var listeners = Set<JMCallKitEventListenerWrapper>()
- private var pendingMuteActions = Set<UUID>()
internal override init() {}
@@ -57,17 +56,10 @@ internal final class JMCallKitEmitter: NSObject, CXProviderDelegate {
}
}
- // MARK: - Add mute action
-
- func addMuteAction(_ actionUUID: UUID) {
- pendingMuteActions.insert(actionUUID)
- }
-
// MARK: - CXProviderDelegate
func providerDidReset(_ provider: CXProvider) {
listeners.forEach { $0.listener?.providerDidReset?() }
- pendingMuteActions.removeAll()
}
func provider(_ provider: CXProvider, perform action: CXAnswerCallAction) {
@@ -87,17 +79,8 @@ internal final class JMCallKitEmitter: NSObject, CXProviderDelegate {
}
func provider(_ provider: CXProvider, perform action: CXSetMutedCallAction) {
- let uuid = pendingMuteActions.remove(action.uuid)
-
- // XXX avoid mute actions ping-pong: if the mute action was caused by
- // the JS side (we requested a transaction) don't call the delegate
- // method. If it was called by the provder itself (when the user presses
- // the mute button in the CallKit view) then call the delegate method.
- if (uuid == nil) {
- listeners.forEach {
- $0.listener?.performSetMutedCall?(UUID: action.callUUID,
- isMuted: action.isMuted)
- }
+ listeners.forEach {
+ $0.listener?.performSetMutedCall?(UUID: action.callUUID, isMuted: action.isMuted)
}
action.fulfill()
diff --git a/ios/sdk/src/callkit/JMCallKitProxy.swift b/ios/sdk/src/callkit/JMCallKitProxy.swift
index cc0061a7bc..de7a0f4f19 100644
--- a/ios/sdk/src/callkit/JMCallKitProxy.swift
+++ b/ios/sdk/src/callkit/JMCallKitProxy.swift
@@ -156,14 +156,6 @@ import Foundation
completion: @escaping (Error?) -> Swift.Void) {
guard enabled else { return }
- // XXX keep track of muted actions to avoid "ping-pong"ing. See
- // JMCallKitEmitter for details on the CXSetMutedCallAction handling.
- for action in transaction.actions {
- if (action as? CXSetMutedCallAction) != nil {
- emitter.addMuteAction(action.uuid)
- }
- }
-
callController.request(transaction, completion: completion)
}
@@ -191,4 +183,3 @@ import Foundation
return update
}
}
-