Created
April 19, 2012 04:03
-
-
Save zac/2418465 to your computer and use it in GitHub Desktop.
A very simple interface to playback audio from a URL.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum { | |
VLMStreamingPlaybackStatusStopped, | |
VLMStreamingPlaybackStatusPlaying, | |
VLMStreamingPlaybackStatusBuffering, | |
VLMStreamingPlaybackStatusCompleted | |
} VLMStreamingPlaybackStatus; | |
typedef void(^VLMStreamingPlaybackStatusCallback)(VLMStreamingPlaybackStatus status); | |
typedef void(^VLMStreamingPlaybackProgressCallback)(CGFloat fractionComplete); | |
typedef void(^VLMStreamingDownloadProgressCallback)(CGFloat fractionComplete); | |
typedef void(^VLMStreamingErrorCallback)(NSError *error); | |
@interface VLMStreamingAudioPlayer : NSObject | |
- (void)streamAndPlayAudioAtURL:(NSURL *)url | |
playbackStatus:(VLMStreamingPlaybackStatusCallback)playbackStatus | |
playbackProgress:(VLMStreamingPlaybackProgressCallback)playbackProgress | |
downloadProgress:(VLMStreamingDownloadProgressCallback)downloadProgress | |
error:(VLMStreamingErrorCallback)error; | |
- (void)stop; | |
@end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment