Skip to content

Commit

Permalink
fix: removed deactivate session on stop
Browse files Browse the repository at this point in the history
  • Loading branch information
demchuk-alex committed Oct 15, 2024
1 parent be07bca commit 27b62df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions ios/AudioController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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)")
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down

0 comments on commit 27b62df

Please sign in to comment.