INNER CODE UNIT · Swift
getAudioCategory
florent37/Flutter-AssetsAudioPlayer · darwin/Classes/Music.swift:176
func getAudioCategory(respectSilentMode: Bool, showNotification: Bool) -> AVAudioSession.Category {
if(showNotification) {
return AVAudioSession.Category.playback
} else if(respectSilentMode) {
return AVAudioSession.Category.soloAmbient
} else {
return AVAudioSession.Category.playback
}
}
#endif
#if os(iOS)
var targets: [String:Any] = [:]
func showNotification(show: Bool) {
#if os(iOS)
let wasShowing = self.displayMediaPlayerNotification
self.displayMediaPlayerNotification = show