marinofaggiana 3 years ago
parent
commit
6588d8ea47
1 changed files with 3 additions and 4 deletions
  1. 3 4
      iOSClient/AppDelegate.swift

+ 3 - 4
iOSClient/AppDelegate.swift

@@ -139,15 +139,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UNUserNotificationCenterD
         UNUserNotificationCenter.current().delegate = self
         UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .badge, .sound]) { (_, _) in }
 
-        // AV
+        // Audio Session
         do {
-            try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default)
+            try AVAudioSession.sharedInstance().setCategory(.playback, mode: .default, options: [.mixWithOthers, .allowAirPlay])
             try AVAudioSession.sharedInstance().setActive(true)
         } catch {
             print(error)
         }
-        application.beginReceivingRemoteControlEvents()
-                
+        
         // Store review
         if !NCUtility.shared.isSimulatorOrTestFlight() {
             let review = NCStoreReview()