An uploaded video is stored in the media cache to avoid downloading it later again

This commit is contained in:
ylecollen
2015-01-13 13:22:20 +01:00
parent a988974773
commit 6f31a90a09
@@ -1080,7 +1080,12 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
MediaLoader *videoUploader = [MediaManager prepareUploaderWithId:localEvent.eventId initialRange:0.1 andRange:0.9];
[videoUploader uploadData:videoData mimeType:videoInfo[@"mimetype"] success:^(NSString *url) {
// remove the related uploadLoader
[MediaManager removeUploaderWithId:localEvent.eventId];
// store the video file in the cache
// there is no reason to download an oneself uploaded media
[MediaManager cacheMediaData:videoData forURL:url andType:videoInfo[@"mimetype"]];
[videoContent setValue:url forKey:@"url"];
[videoContent setValue:videoInfo forKey:@"info"];
[videoContent setValue:@"Video" forKey:@"body"];