MPMusicPlayerController setCurrentPlaybackRate

2019-06-22 14:07发布

The call to setCurrentPlaybackRate to the MPMusicPlayerController stopped working after the latest iOS update, and now gives this error:

2018-04-15 16:24:06.904562-0600 SampleProject[5659:1836398] [SDKPlayback] -
[MPMusicPlayerController setCurrentPlaybackRate:0.670213] completed error: 
Error Domain=MPCPlayerRequestErrorDomain Code=1 "No commands provided." 
UserInfo={NSDebugDescription=No commands provided.}

I'm passing in a valid double value greater than 0 and less than 2.

This is the call: [appMusicPlayer setCurrentPlaybackRate:0.7];

Thanks for any input or help!

P.S. I'm getting a lot of other weird errors too. Here are some:

2018-04-15 17:30:01.976932-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed validators: {(
     setRepeatMode
)}
2018-04-15 17:30:03.976879-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed to get a valid response. Resetting expectations.

2018-04-15 17:30:01.976932-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed validators: {(
    setRepeatMode
)}
2018-04-15 17:30:03.976879-0600 SampleProject[5733:1868672] [SDKPlayback] 
Failed to get a valid response. Resetting expectations.

1条回答
何必那么认真
2楼-- · 2019-06-22 14:31

I just encountered the same issue when trying to use player.append(MPMusicPlayerQueueDescriptor). I found that it would return the same error when the queue for my MPMusicPlayerController was quite large. When I cut it down to around 10, it works with no issues. I haven't experimented to see the maximum I can add to the queue.

I hope this helps, perhaps a smaller queue will also work for you.

查看更多
登录 后发表回答