Commit da4c451d authored by Felix Paul Kühne's avatar Felix Paul Kühne
Browse files

OneDrive: implement streaming

parent 43a4fd81
......@@ -37,6 +37,7 @@
@property (strong, nonatomic) NSString *name;
@property (strong, nonatomic) NSString *type;
@property (strong, nonatomic) NSNumber *size;
@property (strong, nonatomic) NSNumber *duration;
@property (strong, nonatomic) NSString *thumbnailURL;
@property (readonly, nonatomic) BOOL isFolder;
......@@ -45,7 +46,7 @@
@property (strong, nonatomic) NSArray *items;
@property (readonly, nonatomic) NSString *filesPath;
@property (readonly, nonatomic) NSString *downloadPath;
@property (strong, nonatomic) NSString *downloadPath;
@property (readonly, nonatomic) BOOL hasFullFolderTree;
@property (strong, nonatomic) LiveConnectClient *liveClient;
......
......@@ -26,11 +26,6 @@
return [self.objectId stringByAppendingString:@"/files"];
}
- (NSString *)downloadPath
{
return self.objectId;
}
- (BOOL)hasFullFolderTree
{
BOOL hasFullTree = YES;
......@@ -123,6 +118,8 @@
} else {
oneDriveObject.size = rawObject[@"size"];
oneDriveObject.thumbnailURL = rawObject[@"picture"];
oneDriveObject.downloadPath = rawObject[@"source"];
oneDriveObject.duration = rawObject[@"duration"];
[folderFiles addObject:oneDriveObject];
}
[items addObject:oneDriveObject];
......
......@@ -131,6 +131,11 @@
[_activityIndicator startAnimating];
_oneDriveController.currentFolder = selectedObject;
[_oneDriveController loadCurrentFolder];
} else {
/* stream file */
NSURL *url = [NSURL URLWithString:selectedObject.downloadPath];
VLCAppDelegate *appDelegate = (VLCAppDelegate *)[UIApplication sharedApplication].delegate;
[appDelegate openMovieFromURL:url];
}
[self.tableView deselectRowAtIndexPath:indexPath animated:NO];
......
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