Эх сурвалжийг харах

update nuSDKService-S5-210425o.201-B15.2-T14.0 and fix audio AC & VC

alqindiirsyam 3 сар өмнө
parent
commit
83b75f96f4

+ 35 - 35
AppBuilder/AppBuilder.xcodeproj/project.pbxproj

@@ -14,7 +14,6 @@
 		2401CEA1275490DB00B323BB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2401CE9F275490DB00B323BB /* Main.storyboard */; };
 		2401CEA3275490E600B323BB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2401CEA2275490E600B323BB /* Assets.xcassets */; };
 		2401CEA6275490E600B323BB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 2401CEA4275490E600B323BB /* LaunchScreen.storyboard */; };
-		96B80D4A8C5412783B69D43B /* Pods_AppBuilder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A30E22DC0886B4154F6F01E5 /* Pods_AppBuilder.framework */; };
 		A413B18727EACB20006D16EB /* PrefsUtil.swift in Sources */ = {isa = PBXBuildFile; fileRef = A413B18627EACB20006D16EB /* PrefsUtil.swift */; };
 		A42ED92227F30BA200B0FAB7 /* FirstTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42ED92127F30BA200B0FAB7 /* FirstTabViewController.swift */; };
 		A42ED92427F3FC2F00B0FAB7 /* SecondTabViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A42ED92327F3FC2F00B0FAB7 /* SecondTabViewController.swift */; };
@@ -33,6 +32,7 @@
 		CD9D59E32BEE1D30008014B4 /* nu_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = CD9D59D82BEE1D30008014B4 /* nu_icon.png */; };
 		CDFA682D2D841F6200A13E90 /* MainInterface.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CDFA68292D841F6200A13E90 /* MainInterface.storyboard */; };
 		CDFA682E2D841F6200A13E90 /* ShareViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDFA682A2D841F6200A13E90 /* ShareViewController.swift */; };
+		E0308FDDFDA3B4D338D1CB01 /* Pods_AppBuilder.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 723FBB4755C089F11F51DAFE /* Pods_AppBuilder.framework */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
@@ -70,6 +70,8 @@
 /* End PBXCopyFilesBuildPhase section */
 
 /* Begin PBXFileReference section */
+		0A806FC385105116A13143A0 /* Pods-AppBuilder.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppBuilder.debug.xcconfig"; path = "Target Support Files/Pods-AppBuilder/Pods-AppBuilder.debug.xcconfig"; sourceTree = "<group>"; };
+		0CEFC760D412D7044F939773 /* Pods-AppBuilder.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppBuilder.release.xcconfig"; path = "Target Support Files/Pods-AppBuilder/Pods-AppBuilder.release.xcconfig"; sourceTree = "<group>"; };
 		12960ADF2892361000A467DD /* FourthTabViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FourthTabViewController.swift; sourceTree = "<group>"; };
 		2401CE96275490DB00B323BB /* AppBuilder.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AppBuilder.app; sourceTree = BUILT_PRODUCTS_DIR; };
 		2401CE99275490DB00B323BB /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
@@ -79,9 +81,7 @@
 		2401CEA2275490E600B323BB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
 		2401CEA5275490E600B323BB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
 		2401CEA7275490E600B323BB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
-		342E481F45271A8F546A3439 /* Pods-AppBuilder.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppBuilder.release.xcconfig"; path = "Target Support Files/Pods-AppBuilder/Pods-AppBuilder.release.xcconfig"; sourceTree = "<group>"; };
-		39B5DF7983B180E7215C32F7 /* Pods-AppBuilder.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-AppBuilder.debug.xcconfig"; path = "Target Support Files/Pods-AppBuilder/Pods-AppBuilder.debug.xcconfig"; sourceTree = "<group>"; };
-		A30E22DC0886B4154F6F01E5 /* Pods_AppBuilder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppBuilder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+		723FBB4755C089F11F51DAFE /* Pods_AppBuilder.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_AppBuilder.framework; sourceTree = BUILT_PRODUCTS_DIR; };
 		A413B18627EACB20006D16EB /* PrefsUtil.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PrefsUtil.swift; sourceTree = "<group>"; };
 		A42ED92127F30BA200B0FAB7 /* FirstTabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirstTabViewController.swift; sourceTree = "<group>"; };
 		A42ED92327F3FC2F00B0FAB7 /* SecondTabViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SecondTabViewController.swift; sourceTree = "<group>"; };
@@ -110,7 +110,7 @@
 			isa = PBXFrameworksBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				96B80D4A8C5412783B69D43B /* Pods_AppBuilder.framework in Frameworks */,
+				E0308FDDFDA3B4D338D1CB01 /* Pods_AppBuilder.framework in Frameworks */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -131,7 +131,7 @@
 				CDFA682B2D841F6200A13E90 /* AppBuilderShare */,
 				6E32BCCF4DE50EE1A90E8AAE /* Pods */,
 				2401CE97275490DB00B323BB /* Products */,
-				D3D46AA8BAC96331EAD320FC /* Frameworks */,
+				73E5C47B30DFE705A67831A0 /* Frameworks */,
 			);
 			sourceTree = "<group>";
 		};
@@ -178,12 +178,20 @@
 		6E32BCCF4DE50EE1A90E8AAE /* Pods */ = {
 			isa = PBXGroup;
 			children = (
-				39B5DF7983B180E7215C32F7 /* Pods-AppBuilder.debug.xcconfig */,
-				342E481F45271A8F546A3439 /* Pods-AppBuilder.release.xcconfig */,
+				0A806FC385105116A13143A0 /* Pods-AppBuilder.debug.xcconfig */,
+				0CEFC760D412D7044F939773 /* Pods-AppBuilder.release.xcconfig */,
 			);
 			path = Pods;
 			sourceTree = "<group>";
 		};
+		73E5C47B30DFE705A67831A0 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				723FBB4755C089F11F51DAFE /* Pods_AppBuilder.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
 		CDFA682B2D841F6200A13E90 /* AppBuilderShare */ = {
 			isa = PBXGroup;
 			children = (
@@ -195,14 +203,6 @@
 			path = AppBuilderShare;
 			sourceTree = "<group>";
 		};
-		D3D46AA8BAC96331EAD320FC /* Frameworks */ = {
-			isa = PBXGroup;
-			children = (
-				A30E22DC0886B4154F6F01E5 /* Pods_AppBuilder.framework */,
-			);
-			name = Frameworks;
-			sourceTree = "<group>";
-		};
 /* End PBXGroup section */
 
 /* Begin PBXNativeTarget section */
@@ -210,13 +210,13 @@
 			isa = PBXNativeTarget;
 			buildConfigurationList = 2401CEC0275490E600B323BB /* Build configuration list for PBXNativeTarget "AppBuilder" */;
 			buildPhases = (
-				93C598790EC62EDFDD159A1B /* [CP] Check Pods Manifest.lock */,
+				A2E40DAFEDA903E5068C358F /* [CP] Check Pods Manifest.lock */,
 				2401CE92275490DB00B323BB /* Sources */,
 				2401CE93275490DB00B323BB /* Frameworks */,
 				2401CE94275490DB00B323BB /* Resources */,
 				247E0A722796969200430E5F /* Embed Frameworks */,
 				CDEE3DD129B06E1E00B420E5 /* Embed Foundation Extensions */,
-				8676AB173528B9A1F4650145 /* [CP] Embed Pods Frameworks */,
+				AF9BB136451518BD2AD9CF68 /* [CP] Embed Pods Frameworks */,
 			);
 			buildRules = (
 			);
@@ -314,47 +314,47 @@
 /* End PBXResourcesBuildPhase section */
 
 /* Begin PBXShellScriptBuildPhase section */
-		8676AB173528B9A1F4650145 /* [CP] Embed Pods Frameworks */ = {
+		A2E40DAFEDA903E5068C358F /* [CP] Check Pods Manifest.lock */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
 			inputFileListPaths = (
-				"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 			);
 			inputPaths = (
+				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
+				"${PODS_ROOT}/Manifest.lock",
 			);
-			name = "[CP] Embed Pods Frameworks";
+			name = "[CP] Check Pods Manifest.lock";
 			outputFileListPaths = (
-				"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 			);
 			outputPaths = (
+				"$(DERIVED_FILE_DIR)/Pods-AppBuilder-checkManifestLockResult.txt",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks.sh\"\n";
+			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
 			showEnvVarsInLog = 0;
 		};
-		93C598790EC62EDFDD159A1B /* [CP] Check Pods Manifest.lock */ = {
+		AF9BB136451518BD2AD9CF68 /* [CP] Embed Pods Frameworks */ = {
 			isa = PBXShellScriptBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
 			);
 			inputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks-${CONFIGURATION}-input-files.xcfilelist",
 			);
 			inputPaths = (
-				"${PODS_PODFILE_DIR_PATH}/Podfile.lock",
-				"${PODS_ROOT}/Manifest.lock",
 			);
-			name = "[CP] Check Pods Manifest.lock";
+			name = "[CP] Embed Pods Frameworks";
 			outputFileListPaths = (
+				"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks-${CONFIGURATION}-output-files.xcfilelist",
 			);
 			outputPaths = (
-				"$(DERIVED_FILE_DIR)/Pods-AppBuilder-checkManifestLockResult.txt",
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 			shellPath = /bin/sh;
-			shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n    # print error to STDERR\n    echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n    exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
+			shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-AppBuilder/Pods-AppBuilder-frameworks.sh\"\n";
 			showEnvVarsInLog = 0;
 		};
 /* End PBXShellScriptBuildPhase section */
@@ -539,7 +539,7 @@
 		};
 		2401CEC1275490E600B323BB /* Debug */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 39B5DF7983B180E7215C32F7 /* Pods-AppBuilder.debug.xcconfig */;
+			baseConfigurationReference = 0A806FC385105116A13143A0 /* Pods-AppBuilder.debug.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -560,7 +560,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 5.0.27;
+				MARKETING_VERSION = 5.0.29;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -575,7 +575,7 @@
 		};
 		2401CEC2275490E600B323BB /* Release */ = {
 			isa = XCBuildConfiguration;
-			baseConfigurationReference = 342E481F45271A8F546A3439 /* Pods-AppBuilder.release.xcconfig */;
+			baseConfigurationReference = 0CEFC760D412D7044F939773 /* Pods-AppBuilder.release.xcconfig */;
 			buildSettings = {
 				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
 				ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
@@ -596,7 +596,7 @@
 					"$(inherited)",
 					"@executable_path/Frameworks",
 				);
-				MARKETING_VERSION = 5.0.27;
+				MARKETING_VERSION = 5.0.29;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				PROVISIONING_PROFILE_SPECIFIER = "";
@@ -632,7 +632,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
-				MARKETING_VERSION = 5.0.27;
+				MARKETING_VERSION = 5.0.29;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder.AppBuilderShare;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SKIP_INSTALL = YES;
@@ -670,7 +670,7 @@
 					"@executable_path/../../Frameworks",
 				);
 				LOCALIZATION_PREFERS_STRING_CATALOGS = YES;
-				MARKETING_VERSION = 5.0.27;
+				MARKETING_VERSION = 5.0.29;
 				PRODUCT_BUNDLE_IDENTIFIER = io.nexilis.appbuilder.AppBuilderShare;
 				PRODUCT_NAME = "$(TARGET_NAME)";
 				SKIP_INSTALL = YES;

+ 1 - 1
NexilisLite/NexilisLite.podspec

@@ -24,7 +24,7 @@ Pod::Spec.new do |spec|
   spec.resource_bundles = { 'NexilisLite' => ['NexilisLite/Resource/**/*']}
   spec.swift_version = '5.5.1'
   spec.dependency 'FMDB', '~> 2.7.12'
-  spec.dependency 'nuSDKService', '4.0.20'
+  spec.dependency 'nuSDKService', '4.0.21'
   spec.dependency 'NotificationBannerSwift'
   spec.dependency 'Alamofire', '~> 5.10.2'
   spec.dependency 'SDWebImage', '~> 5.20.0'

+ 17 - 64
NexilisLite/NexilisLite/Source/View/Call/QmeraAudioViewController.swift

@@ -266,17 +266,17 @@ class QmeraAudioViewController: UIViewController {
     }()
     
     static func turnSpeakerOn() {
-        var bAudioEngineIsAvtive: Bool! = false
+//        var bAudioEngineIsAvtive: Bool! = false
         API.turnSpeakerPhone(bSPon: bSpeakerPhone)
-        repeat {
-            Thread.sleep(forTimeInterval : 0.3)
-            bAudioEngineIsAvtive = API.bAudioEngineIsRunning()
-            print("Audio Session State: \(bAudioEngineIsAvtive ? "Active" : "Inactive" )")
-            if (bAudioEngineIsAvtive) {
-                break
-            }
-            API.restartAudioEngine()
-        } while (!bAudioEngineIsAvtive)
+//        repeat {
+//            Thread.sleep(forTimeInterval : 0.3)
+//            bAudioEngineIsAvtive = API.bAudioEngineIsRunning()
+//            print("Audio Session State: \(bAudioEngineIsAvtive ? "Active" : "Inactive" )")
+//            if (bAudioEngineIsAvtive) {
+//                break
+//            }
+//            API.restartAudioEngine()
+//        } while (!bAudioEngineIsAvtive)
         var volume:Float! = 0
         if (bSpeakerPhone) {
             DispatchQueue.main.async {
@@ -319,7 +319,7 @@ class QmeraAudioViewController: UIViewController {
     private func backToDefaultAudioSession() {
         do {
             let audioSession = AVAudioSession.sharedInstance()
-            try audioSession.setCategory(.playAndRecord, mode: .default, options: [.allowBluetooth])
+            try audioSession.setCategory(.playAndRecord, mode: .voiceChat, options: [.allowBluetooth, .mixWithOthers])
             try audioSession.overrideOutputAudioPort(.speaker)
             try audioSession.setPreferredSampleRate(44100)
             try audioSession.setActive(true)
@@ -366,12 +366,6 @@ class QmeraAudioViewController: UIViewController {
         NotificationCenter.default.addObserver(self, selector: #selector(onStatusCall(_:)), name: NSNotification.Name(rawValue: Nexilis.listenerStatusCall), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(onReceiveMessage(notification:)), name: NSNotification.Name(rawValue: Nexilis.listenerReceiveChat), object: nil)
         NotificationCenter.default.addObserver(self, selector: #selector(onCallFCM(notification:)), name: NSNotification.Name(rawValue: Nexilis.callFCM), object: nil)
-        NotificationCenter.default.addObserver(
-                    self,
-                    selector: #selector(handleRouteChange),
-                    name: AVAudioSession.routeChangeNotification,
-                    object: nil
-                )
         
         if let u = self.user {
             self.users.append(u)
@@ -439,15 +433,7 @@ class QmeraAudioViewController: UIViewController {
                     } catch {
                         
                     }
-                    let audioSession = AVAudioSession.sharedInstance()
-                    do {
-                        try audioSession.setCategory(.playAndRecord, mode: .default, options: [.allowBluetooth])
-                        try audioSession.overrideOutputAudioPort(.speaker)
-                        try audioSession.setPreferredSampleRate(44100)
-                        try audioSession.setActive(true)
-                    } catch {
-                        print("Audio session error: \(error)")
-                    }
+                    self.backToDefaultAudioSession()
                     while API.nGetCLXConnState() == 0 {
                         Thread.sleep(forTimeInterval : 0.3)
                     }
@@ -459,39 +445,6 @@ class QmeraAudioViewController: UIViewController {
         self.idCall = (User.getMyPin() ?? "") + CoreMessage_TMessageUtil.getTID()
     }
     
-    @objc func handleRouteChange(notification: Notification) {
-        guard let userInfo = notification.userInfo,
-              let reasonValue = userInfo[AVAudioSessionRouteChangeReasonKey] as? UInt,
-              let reason = AVAudioSession.RouteChangeReason(rawValue: reasonValue) else { return }
-
-        switch reason {
-        case .newDeviceAvailable:
-            print("🎧 Headphones plugged in")
-        case .oldDeviceUnavailable:
-            print("🎧 Headphones unplugged")
-        case .categoryChange:
-            DispatchQueue.main.async { [self] in
-                if !canChangeSpeaker {
-                    canChangeSpeaker = true
-                } else if APIS.checkAppStateisBackground() {
-                    if canChangeSpeaker {
-                        didSpeaker(sender: nil)
-                    }
-                }
-            }
-        case .override:
-            DispatchQueue.main.async { [self] in
-                if APIS.checkAppStateisBackground() {
-                    if canChangeSpeaker {
-                        didSpeaker(sender: nil)
-                    }
-                }
-            }
-        default:
-            print("🔄 Audio route changed: \(reason)")
-        }
-    }
-    
     override func observeValue(forKeyPath keyPath: String?, of object: Any?, change: [NSKeyValueChangeKey : Any]?, context: UnsafeMutableRawPointer?) {
             if (keyPath! == "outputVolume") {
                 if let newKey = change?[NSKeyValueChangeKey.newKey] as? NSNumber {
@@ -1119,11 +1072,11 @@ class QmeraAudioViewController: UIViewController {
 //                        }
 //                    } while (QmeraAudioViewController.isLoop)
 //                }
-                DispatchQueue.main.async { [self] in
-                    QmeraAudioViewController.bSpeakerPhone = true
-                    self.tempSpeaker = true
-                    didSpeaker(sender: nil)
-                }
+//                DispatchQueue.main.async { [self] in
+//                    QmeraAudioViewController.bSpeakerPhone = true
+//                    self.tempSpeaker = true
+//                    didSpeaker(sender: nil)
+//                }
             } else if state == Nexilis.AUDIO_CALL_RINGING || (!ticketId.isEmpty && state == Nexilis.VIDEO_CALL_RINGING) {
                 if users.count == 1 && !autoAcceptAPN {
                     DispatchQueue.main.async {

+ 12 - 20
NexilisLite/NexilisLite/Source/View/Call/QmeraVideoViewController.swift

@@ -146,17 +146,17 @@ class QmeraVideoViewController: UIViewController {
     }()
     
     static func turnSpeakerOn() {
-        var bAudioEngineIsAvtive: Bool! = false
+//        var bAudioEngineIsAvtive: Bool! = false
         API.turnSpeakerPhone(bSPon: bSpeakerPhone)
-        repeat {
-            Thread.sleep(forTimeInterval : 0.3)
-            bAudioEngineIsAvtive = API.bAudioEngineIsRunning()
-            print("Audio Session State: \(bAudioEngineIsAvtive ? "Active" : "Inactive" )")
-            if (bAudioEngineIsAvtive) {
-                break
-            }
-            API.restartAudioEngine()
-        } while (!bAudioEngineIsAvtive)
+//        repeat {
+//            Thread.sleep(forTimeInterval : 0.3)
+//            bAudioEngineIsAvtive = API.bAudioEngineIsRunning()
+//            print("Audio Session State: \(bAudioEngineIsAvtive ? "Active" : "Inactive" )")
+//            if (bAudioEngineIsAvtive) {
+//                break
+//            }
+//            API.restartAudioEngine()
+//        } while (!bAudioEngineIsAvtive)
         var volume:Float! = 0
         if (bSpeakerPhone) {
             volume = lastVolume * nMaxSPOn
@@ -202,7 +202,7 @@ class QmeraVideoViewController: UIViewController {
     private func backToDefaultAudioSession() {
         do {
             let audioSession = AVAudioSession.sharedInstance()
-            try audioSession.setCategory(.playAndRecord, mode: .default, options: .allowBluetooth)
+            try audioSession.setCategory(.playAndRecord, mode: .voiceChat, options: [.allowBluetooth, .mixWithOthers])
             try audioSession.overrideOutputAudioPort(.speaker)
             try audioSession.setPreferredSampleRate(48000)
             try audioSession.setActive(true)
@@ -253,15 +253,7 @@ class QmeraVideoViewController: UIViewController {
                 } catch {
                     
                 }
-                let audioSession = AVAudioSession.sharedInstance()
-                do {
-                    try audioSession.setCategory(.playAndRecord, mode: .default, options: [.allowBluetooth])
-                    try audioSession.overrideOutputAudioPort(.speaker)
-                    try audioSession.setPreferredSampleRate(48000)
-                    try audioSession.setActive(true)
-                } catch {
-                    print("Audio session error: \(error)")
-                }
+                self.backToDefaultAudioSession()
                 while API.nGetCLXConnState() == 0 {
                     Thread.sleep(forTimeInterval : 0.3)
                 }

+ 1 - 1
NexilisLite/Podfile

@@ -7,7 +7,7 @@ target 'NexilisLite' do
 
   # Pods for NexilisLite
 
-  pod 'nuSDKService', '4.0.20'
+  pod 'nuSDKService', '4.0.21'
   pod 'FMDB', '~> 2.7.12'
   pod 'NotificationBannerSwift', :git => 'https://github.com/Daltron/NotificationBanner.git', :tag => '4.0.0'
   pod 'Alamofire', '~> 5.10.2'

+ 1 - 1
StreamShield/Podfile

@@ -6,6 +6,6 @@ target 'StreamShield' do
   use_frameworks!
 
   # Pods for StreamShield
-  pod 'nuSDKService', '~> 4.0.20'
+  pod 'nuSDKService', '~> 4.0.21'
 
 end

+ 1 - 1
StreamShield/StreamShield.podspec

@@ -22,7 +22,7 @@ Pod::Spec.new do |spec|
   spec.source_files = 'StreamShield/Source/**/*'
   spec.resource_bundles = { 'StreamShield' => ['StreamShield/Resource/**/*']}
   spec.swift_version = '5.5.1'
-  spec.dependency 'nuSDKService', '~> 4.0.20'
+  spec.dependency 'nuSDKService', '~> 4.0.21'
   spec.ios.vendored_frameworks = "StreamShield.framework"
   spec.pod_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64', 'ENABLE_BITCODE' => 'NO' }
   spec.user_target_xcconfig = { 'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'arm64', 'ENABLE_BITCODE' => 'NO' }