Playlist Generator  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
Public Member Functions | Protected Attributes
SpotifyPlayer Class Reference

#import <SpotifyPlayer.h>

List of all members.

Public Member Functions

(void) - setArray:
 Called in the previous view controller, this method fills the array with tracks to be played.
(void) - loginToSpotifyWithUsername:andPassword:
 This method creates a SPSpotify session to connect to the Spotify API.
(void) - playTrackAtIndex:
 This method causes the track at index to be loaded and played.
(void) - getCoverImageForTrack:
 This method causes the track object to load its album cover as an SPImage.
(void) - timerFireMethod:
 This method is called automatically when any NSTimer fires.
(void) - initAudioSession
(IBAction) - togglePlayPause:
(IBAction) - nextTrack:
(IBAction) - previousTrack:
(IBAction) - movedSlider:
(IBAction) - showActionSheet:

Protected Attributes

IBOutlet UIBarButtonItem * playPauseButton
IBOutlet UILabel * trackLabel
IBOutlet UILabel * artistLabel
IBOutlet UIImageView * coverImageView
IBOutlet UISlider * progressMeter
IBOutlet UIToolbar * bottomToolbar
MBProgressHUDhud
MPNowPlayingInfoCenter * nowPlaying
NSMutableDictionary * nowPlayingInfo
NSArray * trackURIs
int currentTrackPlayingIndex
SPPlaybackManager * manager
NSTimeInterval currentTrackDuration
NSTimer * timer

Detailed Description

This view controller contains all of the UI elements for loading and playing music using the Spotify API.


Member Function Documentation

- (void) getCoverImageForTrack: (SPTrack *)  track

This method causes the track object to load its album cover as an SPImage.

Parameters:
trackAn SPTrack object
- (void) initAudioSession
- (void) loginToSpotifyWithUsername: (NSString *)  username
andPassword: (NSString *)  password 

This method creates a SPSpotify session to connect to the Spotify API.

Parameters:
usernameA valid Spotify Premium username
passwordA valid Spotify Premium password
- (IBAction) movedSlider: (id)  sender
- (IBAction) nextTrack: (id)  sender
- (void) playTrackAtIndex: (NSNumber *)  index

This method causes the track at index to be loaded and played.

Parameters:
indexThe index of trackURIs to be played
- (IBAction) previousTrack: (id)  sender
- (void) setArray: (NSArray *)  theArray

Called in the previous view controller, this method fills the array with tracks to be played.

Parameters:
theArrayThe array of tracks to be played.
- (void) showActionSheet: (id)  sender
- (void) timerFireMethod: (NSTimer*)  theTimer

This method is called automatically when any NSTimer fires.

Parameters:
theTimerThe NSTimer object that fired
- (IBAction) togglePlayPause: (id)  sender

Member Data Documentation

- (IBOutlet UILabel*) artistLabel [protected]
- (IBOutlet UIToolbar*) bottomToolbar [protected]
- (IBOutlet UIImageView*) coverImageView [protected]
- (NSTimeInterval) currentTrackDuration [protected]
- (int) currentTrackPlayingIndex [protected]
- (MBProgressHUD*) hud [protected]
- (SPPlaybackManager*) manager [protected]
- (MPNowPlayingInfoCenter*) nowPlaying [protected]
- (NSMutableDictionary*) nowPlayingInfo [protected]
- (IBOutlet UIBarButtonItem*) playPauseButton [protected]
- (IBOutlet UISlider*) progressMeter [protected]
- (NSTimer*) timer [protected]
- (IBOutlet UILabel*) trackLabel [protected]
- (NSArray*) trackURIs [protected]

The documentation for this class was generated from the following files: