rm from swift (#4923)

zio/stable
Hailey 2024-08-12 13:46:33 -07:00 committed by GitHub
parent db7a744433
commit ae883e2df7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 0 additions and 13 deletions

View File

@ -14,14 +14,9 @@ public class ExpoPlatformInfoModule: Module {
}
Function("setAudioActive") { (active: Bool) in
var categoryOptions: AVAudioSession.CategoryOptions
let currentCategory = AVAudioSession.sharedInstance().category
if active {
categoryOptions = [.mixWithOthers]
try? AVAudioSession.sharedInstance().setActive(true)
} else {
categoryOptions = [.duckOthers]
try? AVAudioSession
.sharedInstance()
.setActive(
@ -29,14 +24,6 @@ public class ExpoPlatformInfoModule: Module {
options: [.notifyOthersOnDeactivation]
)
}
try? AVAudioSession
.sharedInstance()
.setCategory(
currentCategory,
mode: .default,
options: categoryOptions
)
}
}
}