MPMusicPlayerController should provide stop reason
Originator: | jay.whitsitt | ||
Number: | rdar://28456443 | Date Originated: | 23 Sept 2016 |
Status: | Open | Resolved: | |
Product: | iOS SDK | Product Version: | iOS 10 |
Classification: | Enhancement | Reproducible: | N/A |
Summary: There's currently no way of knowing why a song stopped playing. It's important to handle the UI appropriately if a song stops playing because it reached the end of the song compared to if the user was streaming and lost network connection. AVPlayer handles the above scenarios by having error handling as well as the AVPlayerItemDidPlayToEndTimeNotification notification. A similar notification would be a huge improvement. At the moment, I'm saving the current playback position and when the playbackState changes to stopped, I compare the song's duration with the last know position. If it's within a threshold, I assume it reached the end. This is not a very robust workaround. Steps to Reproduce: 1. [[MPMusicPlayerController applicationMusicPlayer] setQueueForStoreIDs:trackId]; 2. Let the song play to the end Expected Results: I confidently know that the song played to the end Actual Results: I only know that no song is playing anymore Version: iOS 10.0.1, Xcode 8.0, OS X El Capitan 10.11.6 Notes: Configuration: iPhone 6, Project Fi Attachments:
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!