Skip to content

Commit

Permalink
fix: fixed throwable for module
Browse files Browse the repository at this point in the history
  • Loading branch information
demchuk-alex committed Oct 7, 2024
1 parent fe71346 commit 2123c91
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ios/ExpoPlayAudioStreamModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ public class ExpoPlayAudioStreamModule: Module {
}

AsyncFunction("resetAudioSession") { (promise: Promise) in
audioController.reset()
promise.resolve(nil)
do {
try audioController.reset()
promise.resolve(nil)
} catch {
promise.reject("RESET_ERROR", "Failed to reset audio session: \(error.localizedDescription)")
}
}

OnCreate {}
Expand Down

0 comments on commit 2123c91

Please sign in to comment.