From 27b62dfd6097772c211d1938e18a1badf273c29e Mon Sep 17 00:00:00 2001 From: Alexander Demchuk Date: Tue, 15 Oct 2024 09:19:44 +0200 Subject: [PATCH] fix: removed deactivate session on stop --- ios/AudioController.swift | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ios/AudioController.swift b/ios/AudioController.swift index 6479b34..00c4c03 100644 --- a/ios/AudioController.swift +++ b/ios/AudioController.swift @@ -28,7 +28,7 @@ public class AudioController { private func activateAudioSession() throws { let audioSession = AVAudioSession.sharedInstance() try audioSession.setCategory(.playAndRecord, mode: .default, options: [.mixWithOthers, .duckOthers]) - try audioSession.setActive(true, options: .notifyOthersOnDeactivation) + try audioSession.setActive(true) } private func deactivateAudioSession() throws { @@ -223,7 +223,7 @@ public class AudioController { if !self.bufferQueue.isEmpty { self.bufferQueue.removeAll() } - try self.deactivateAudioSession() // Deactivate the session + //try self.deactivateAudioSession() // Deactivate the session promise.resolve(nil) } catch { promise.reject("PLAYBACK_STOP", "Failed to deactivate audio session: \(error.localizedDescription)") diff --git a/package.json b/package.json index f8609ba..709ee5e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@mykin-ai/expo-audio-stream", - "version": "0.1.30", + "version": "0.1.31", "description": "Expo Play Audio Stream module", "main": "build/index.js", "types": "build/index.d.ts",