INNER CODE UNIT · Swift
setupMediaPlayerNotificationView
florent37/Flutter-AssetsAudioPlayer · darwin/Classes/Music.swift:221
func setupMediaPlayerNotificationView(notificationSettings: NotificationSettings, audioMetas: AudioMetas, isPlaying: Bool) {
self.notificationSettings = notificationSettings
self.audioMetas = audioMetas
UIApplication.shared.beginReceivingRemoteControlEvents()
let commandCenter = MPRemoteCommandCenter.shared()
// Fallback on earlier versions
self.updateNotif(audioMetas: audioMetas, isPlaying: isPlaying)
self.deinitMediaPlayerNotifEvent()
// added seekBar
if #available(iOS 9.1, *) {
commandCenter.changePlaybackPositionCommand.isEnabled = true