We're using the iOS Spotify sdk to play Spotify tracks via SPTAudioStreamingController
. I'm playing a track via playURIs:fromIndex:callback
but the goal is to play it back starting from a given time offset (vs the start of the track).
I've tried passing a callback to playURIs:fromIndex:callback
that calls seekToOffset:callback
to the desired time index but that fails or is otherwise ignored (presumably because the Spotify player internals aren't yet set up in a state to perform the seek).
I would even consider initiating a seek via dispatch_get_main_queue()
with a delay, but that makes me (a) want to take a shower and (b) has the gross side effect of hearing the first second or two of audio before the seek is executed. Yikes!
If there's any devs who know the internals that could hit tip a quality way to do this, that'd be awesome!