fix #32 override mute was not working anymore
This commit is contained in:
parent
7798930456
commit
6d35008f72
|
@ -28,6 +28,13 @@ class SoundPlayer {
|
|||
return
|
||||
}
|
||||
|
||||
do {
|
||||
try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, options: AVAudioSession.CategoryOptions.mixWithOthers)
|
||||
try AVAudioSession.sharedInstance().setActive(true)
|
||||
} catch let error {
|
||||
trace("in playSound, could not set AVAudioSession category to playback and mixwithOthers, error = %{public}@", log: self.log, type: .error, error.localizedDescription)
|
||||
}
|
||||
|
||||
do {
|
||||
try audioPlayer = AVAudioPlayer(contentsOf: url)
|
||||
|
||||
|
|
Loading…
Reference in New Issue