Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions Pod/Classes/AUMediaItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ typedef NS_ENUM(NSInteger, AUMediaType){

@protocol AUMediaItem <NSObject, NSCoding>

@optional

- (BOOL)isLocalItem;
- (NSString *)localPath;

@required

/*****************************************************************************
Expand Down
5 changes: 4 additions & 1 deletion Pod/Classes/AUMediaPlayer.m
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,10 @@ - (void)updatePlayerWithItem:(id<AUMediaItem>)item error:(NSError * __autoreleas
[self prepareForCurrentItemReplacementWithItem:item];

NSURL *url = nil;
if ([_library itemIsDownloaded:item]) {
if([item isLocalItem]) {
url = [NSURL fileURLWithPath: [item localPath]];
}
if ([_library itemIsDownloaded:item] && !url) {
url = [NSURL fileURLWithPath:[_library localPathForItem:item]];
NSLog(@"Playback will occur from local file with url: %@", url);
}
Expand Down