From time to time, when using the Spotify player, we experience stuttering that lasts about ten seconds. Although there are several aspects that seem abnormal to me, the most consistent sign that this is happening is that we hit the delegate method didStartPlayingTrack
more than once, although we only told the player to play once. Does anyone have any ideas what might lead to this?
Important Note: This spotify-ios-sdk version 0.21
Sample Logs:
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyTrackDelivered") // Last track ended
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyAudioDeliveryDone")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyPause")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyMetadataChanged")
movePlayerPosition(_:completion:)[L:180]: seek successful to 0.842
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyMetadataChanged")
13:13:50 audioStreaming(_:didStartPlayingTrack:)[L:377]: didStartPlayingTrack: Optional("So Far Away (Live) - Live")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyTrackChanged")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackEventAudioFlush")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyPlay")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyMetadataChanged")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyMetadataChanged")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyContextChanged")
13:14:01 audioStreaming(_:didStartPlayingTrack:)[L:377]: didStartPlayingTrack: Optional("So Far Away (Live) - Live")
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackNotifyTrackChanged")
audioStreaming(_:didSeekToPosition:)[L:474]: did seek to position: 0.001
audioStreaming(_:didReceive:withName:)[L:412]: didReceiveEvent: Optional("SPPlaybackEventAudioFlush")
Is there a way to prevent this stuttering?
Update
25, . , , , didSeekToPosition
, ; , , , :
audioStreaming(_:didStartPlayingTrack:)[L:377]: didStartPlayingTrack
audioStreaming(_:didSeekToPosition:)[L:474]: did seek to position: 0.001
, , playSpotifyUri
; didStartPlaying
.