Conforms to NSObject
Declared in SPTAudioStreamingController.h

Overview

Defines events relating to audio playback.

Instance Methods

audioStreaming:didChangeMetadata:

Called when metadata for current, previous, or next track is changed. * * This event occurs when playback starts or changes to a different context, * when a track switch occurs, etc. This is an informational event that does * not require action, but should be used to keep the UI display updated with * the latest metadata information. *

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangeMetadata:(SPTPlaybackMetadata *)metadata

Parameters

audioStreaming

The object that sent the message.

metadata

for previous, current, and next tracks

Declared In

SPTAudioStreamingController.h

audioStreaming:didChangePlaybackStatus:

Called when playback status changes.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangePlaybackStatus:(BOOL)isPlaying

Parameters

audioStreaming

The object that sent the message.

isPlaying

Set to YES if the object is playing audio, NO if it is paused.

Declared In

SPTAudioStreamingController.h

audioStreaming:didChangePosition:

Called when playback has progressed

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangePosition:(NSTimeInterval)position

Parameters

audioStreaming

The object that sent the message.

position

The new playback location in sec.

Declared In

SPTAudioStreamingController.h

audioStreaming:didChangeRepeatStatus:

Called when repeat status changes.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangeRepeatStatus:(SPTRepeatMode)repeateMode

Parameters

audioStreaming

The object that sent the message.

repeateMode

Set to SPTRepeatOff, SPTRepeatContext or SPTRepeatOne.

Declared In

SPTAudioStreamingController.h

audioStreaming:didChangeShuffleStatus:

Called when shuffle status changes.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangeShuffleStatus:(BOOL)enabled

Parameters

audioStreaming

The object that sent the message.

enabled

Set to YES if the object requests shuffled playback, otherwise NO.

Declared In

SPTAudioStreamingController.h

audioStreaming:didChangeVolume:

Called when playback volume changes.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didChangeVolume:(SPTVolume)volume

Parameters

audioStreaming

The object that sent the message.

volume

The new volume.

Declared In

SPTAudioStreamingController.h

audioStreaming:didReceivePlaybackEvent:

Called for each received low-level event

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didReceivePlaybackEvent:(SpPlaybackEvent)event

Parameters

audioStreaming

The object that sent the message.

event

The event code

Declared In

SPTAudioStreamingController.h

audioStreaming:didSeekToPosition:

Called when playback is seeked “unaturally” to a new location.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didSeekToPosition:(NSTimeInterval)position

Parameters

audioStreaming

The object that sent the message.

position

The new playback location in sec.

Declared In

SPTAudioStreamingController.h

audioStreaming:didStartPlayingTrack:

Called when the streaming controller begins playing a new track.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didStartPlayingTrack:(NSString *)trackUri

Parameters

audioStreaming

The object that sent the message.

trackUri

The Spotify URI of the track that started to play.

Declared In

SPTAudioStreamingController.h

audioStreaming:didStopPlayingTrack:

Called before the streaming controller begins playing another track.

- (void)audioStreaming:(SPTAudioStreamingController *)audioStreaming didStopPlayingTrack:(NSString *)trackUri

Parameters

audioStreaming

The object that sent the message.

trackUri

The Spotify URI of the track that stopped.

Declared In

SPTAudioStreamingController.h

audioStreamingDidBecomeActivePlaybackDevice:

Called when the audio streaming object becomes the active playback device on the user’s account.

- (void)audioStreamingDidBecomeActivePlaybackDevice:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Declared In

SPTAudioStreamingController.h

audioStreamingDidBecomeInactivePlaybackDevice:

Called when the audio streaming object becomes an inactive playback device on the user’s account.

- (void)audioStreamingDidBecomeInactivePlaybackDevice:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Declared In

SPTAudioStreamingController.h

audioStreamingDidLosePermissionForPlayback:

Called when the streaming controller lost permission to play audio.

- (void)audioStreamingDidLosePermissionForPlayback:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Discussion

This typically happens when the user plays audio from their account on another device.

Declared In

SPTAudioStreamingController.h

audioStreamingDidPopQueue:

Called when the streaming controller popped a new item from the playqueue.

- (void)audioStreamingDidPopQueue:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Declared In

SPTAudioStreamingController.h

audioStreamingDidSkipToNextTrack:

Called when the audio streaming object requests playback skips to the next track.

- (void)audioStreamingDidSkipToNextTrack:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Declared In

SPTAudioStreamingController.h

audioStreamingDidSkipToPreviousTrack:

Called when the audio streaming object requests playback skips to the previous track.

- (void)audioStreamingDidSkipToPreviousTrack:(SPTAudioStreamingController *)audioStreaming

Parameters

audioStreaming

The object that sent the message.

Declared In

SPTAudioStreamingController.h