Stack Overflow Asked by AlexW.H.B. on February 13, 2021
I have gotten some of the NowPlaying view text elements to work using this:
func updateInfoState(){
let artwork = MPMediaItemArtwork.init(boundsSize: self.uiImage.size, requestHandler: { (size) -> UIImage in
return self.uiImage
})
MPNowPlayingInfoCenter.default().nowPlayingInfo = [MPMediaItemPropertyAlbumTitle: title,
MPMediaItemPropertyArtist: author,
MPMediaItemPropertyTitle: trackName,
MPMediaItemPropertyArtwork:artwork,
MPNowPlayingInfoPropertyElapsedPlaybackTime: 0.0,
MPNowPlayingInfoPropertyPlaybackRate: 1.0,
MPNowPlayingInfoPropertyIsLiveStream: false,
]
}
But I’m unable to get the playback position to update. I was trying MPNowPlayingInfoPropertyElapsedPlaybackTime
and MPNowPlayingInfoPropertyPlaybackRate
, but they literally did nothing. Any help would be greatly appreciated.
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP