|
@@ -431,12 +431,12 @@ public class Nexilis: NSObject {
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
- public static func initiateAudio() {
|
|
|
|
- do {
|
|
|
|
- try AVAudioSession.sharedInstance().setPreferredSampleRate(AVAudioSession.sharedInstance().sampleRate)
|
|
|
|
- } catch {
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+// public static func initiateAudio() {
|
|
|
|
+// do {
|
|
|
|
+// try AVAudioSession.sharedInstance().setPreferredSampleRate(AVAudioSession.sharedInstance().sampleRate)
|
|
|
|
+// } catch {
|
|
|
|
+// }
|
|
|
|
+// }
|
|
|
|
|
|
// public static func startAudio(isVideo: Bool = true) {
|
|
// public static func startAudio(isVideo: Bool = true) {
|
|
// do {
|
|
// do {
|
|
@@ -1679,6 +1679,17 @@ extension Nexilis: CallDelegate {
|
|
controller.user = User.getData(pin: String(deviceId))
|
|
controller.user = User.getData(pin: String(deviceId))
|
|
controller.isOutgoing = false
|
|
controller.isOutgoing = false
|
|
controller.modalPresentationStyle = .overCurrentContext
|
|
controller.modalPresentationStyle = .overCurrentContext
|
|
|
|
+ if UIApplication.shared.visibleViewController is UIAlertController {
|
|
|
|
+ let vc = UIApplication.shared.visibleViewController as! UIAlertController
|
|
|
|
+ vc.dismiss(animated: true, completion: {
|
|
|
|
+ if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
|
|
+ UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
|
|
+ } else {
|
|
|
|
+ UIApplication.shared.visibleViewController?.present(controller, animated: true, completion: nil)
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
if UIApplication.shared.visibleViewController?.navigationController != nil {
|
|
UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
UIApplication.shared.visibleViewController?.navigationController?.present(controller, animated: true, completion: nil)
|
|
} else {
|
|
} else {
|