From 2123c91cdb7aea80ab241cfdd5864bf996eb3d28 Mon Sep 17 00:00:00 2001 From: Alexander Demchuk Date: Mon, 7 Oct 2024 14:41:31 +0200 Subject: [PATCH] fix: fixed throwable for module --- ios/ExpoPlayAudioStreamModule.swift | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/ios/ExpoPlayAudioStreamModule.swift b/ios/ExpoPlayAudioStreamModule.swift index a50986e..2ed19c6 100644 --- a/ios/ExpoPlayAudioStreamModule.swift +++ b/ios/ExpoPlayAudioStreamModule.swift @@ -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 {}