Skip to content

Commit

Permalink
rm from swift (#4923)
Browse files Browse the repository at this point in the history
  • Loading branch information
haileyok authored Aug 12, 2024
1 parent db7a744 commit ae883e2
Showing 1 changed file with 0 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,16 @@ 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(
false,
options: [.notifyOthersOnDeactivation]
)
}

try? AVAudioSession
.sharedInstance()
.setCategory(
currentCategory,
mode: .default,
options: categoryOptions
)
}
}
}

0 comments on commit ae883e2

Please sign in to comment.