forked from tumtumtum/StreamingKit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More documentation. STKAutoRecoveringHTTPDataSource is now default fo…
…r HTTP
- Loading branch information
Showing
3 changed files
with
15 additions
and
6 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,7 @@ This product includes software developed by Thong Nguyen ([email protected]) | |
#import "STKAudioPlayer.h" | ||
#import "AudioToolbox/AudioToolbox.h" | ||
#import "STKHTTPDataSource.h" | ||
#import "STKAutoRecoveringHTTPDataSource.h" | ||
#import "STKLocalFileDataSource.h" | ||
#import "STKQueueEntry.h" | ||
#import "NSMutableArray+STKAudioPlayer.h" | ||
|
@@ -367,15 +368,15 @@ -(void) stopSystemBackgroundTask | |
|
||
+(STKDataSource*) dataSourceFromURL:(NSURL*)url | ||
{ | ||
STKDataSource* retval; | ||
STKDataSource* retval = nil; | ||
|
||
if ([url.scheme isEqualToString:@"file"]) | ||
{ | ||
retval = [[STKLocalFileDataSource alloc] initWithFilePath:url.path]; | ||
} | ||
else | ||
else if ([url.scheme isEqualToString:@"http"] || [url.scheme isEqualToString:@"https"]) | ||
{ | ||
retval = [[STKHTTPDataSource alloc] initWithURL:url]; | ||
retval = [[STKAutoRecoveringHTTPDataSource alloc] initWithHTTPDataSource:[[STKHTTPDataSource alloc] initWithURL:url]]; | ||
} | ||
|
||
return retval; | ||
|