Commit 4a62c095 authored by Stephan Hesse's avatar Stephan Hesse Committed by Sebastian Dröge

ios playback: introduce macro to enable photos/ library

Until now the photo library integration is broken (that API was
deprecated by Apple) and the iTunes integration is better to have
optional to put our test files in the forefront (and have better way to
browse large iTunes libs).
parent a9a8e364
......@@ -2,6 +2,8 @@
#import "VideoViewController.h"
#import <AssetsLibrary/AssetsLibrary.h>
#define ENABLE_IOS_LIBRARY false
@interface LibraryViewController ()
......@@ -95,10 +97,14 @@ static NSString *CellIdentifier = @"CellIdentifier";
- (void)refreshMediaItems {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSAllDomainsMask, YES);
NSString *docsPath = [paths objectAtIndex:0];
NSMutableArray *entries;
/* Entries from the Photo Library */
NSMutableArray *entries = [[NSMutableArray alloc] init];
entries = [[NSMutableArray alloc] init];
ALAssetsLibrary *library = [[ALAssetsLibrary alloc] init];
[library enumerateGroupsWithTypes:ALAssetsGroupAll
usingBlock:^(ALAssetsGroup *group, BOOL *stop)
......@@ -130,6 +136,8 @@ static NSString *CellIdentifier = @"CellIdentifier";
[entries addObject:[NSString stringWithFormat:@"file://%@/%@", docsPath, e]];
self->mediaEntries = entries;
self->onlineEntries = [NSArray arrayWithContentsOfURL:[[NSBundle mainBundle] URLForResource:@"OnlineMedia" withExtension:@"plist"]];
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment