INNER CODE UNIT · Swift

updateNotifStatus

florent37/Flutter-AssetsAudioPlayer · darwin/Classes/Music.swift:315

    func updateNotifStatus(playing: Bool, stopped: Bool, rate: Float?) {
        if(self.displayMediaPlayerNotification){
            #if os(iOS)
            if #available(iOS 13.0, *) {
                if(stopped) {
                    MPNowPlayingInfoCenter.default().playbackState = .stopped
                } else {
                    if(playing){
                        MPNowPlayingInfoCenter.default().playbackState = .playing
                    } else {
                        MPNowPlayingInfoCenter.default().playbackState = .paused
                    }
                }
            }
            if(!playing){
                self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = 0
            } else {
                self.nowPlayingInfo[MPNowPlayingInfoPropertyPlaybackRate] = rate

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…