             }
         }
     }
+    
+    /// Sets whether SwiftyCam should enable background audio from other applications or sources 
+    
+    fileprivate func setBackgroundAudioPreference() {
+        guard allowBackgroundAudio == true else {
+            return
+        }
+        
+        do{
+            try AVAudioSession.sharedInstance().setCategory(AVAudioSessionCategoryPlayAndRecord,
+                                                            with: [.duckOthers, .defaultToSpeaker])
+
+            session.automaticallyConfiguresApplicationAudioSession = false
+        }
+        catch {
+            print("[SwiftyCam]: Failed to set background audio preference")
+            
+        }
+    }
 }
 
 extension SwiftyCamViewController : SwiftyCamButtonDelegate {

    
    
    public func switchCamera() {
        guard isVideRecording != true else {
            //TODO: Look into switching camera during video recording
            print("[SwiftyCam]: Switching between cameras while recording video is not supported")
            return

    
    override open func viewDidAppear(_ animated: Bool) {
        super.viewDidAppear(animated)
        
        // Set background audio preference
        
        setBackgroundAudioPreference()
        
        sessionQueue.async {
            switch self.setupResult {
