标签: ios objective-c mpmusicplayercontroller
我想知道如何获得MPMusicPlayer的当前位置。例如,如果音乐播放器正在播放歌曲并且当前时间为0分23秒,那么我如何获得该值以及设置它?
答案 0 :(得分:2)
请使用以下属性获取当前位置
mpMusicPlayer.currentPlaybackTime
答案 1 :(得分:0)
以下链接可以为您提供帮助 -
How to set music playback slider in music player
Problems with currentPlaybackTime and MPMusicPlayerController and iOS 7.1.
Using MPMusicPlayerController, setting musicPlayer.currentPlaybackTime to seek but takes second to take effect
https://github.com/gangverk/GVMusicPlayerController