mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 17:12:45 +02:00
Made some changes in video upload for debugging only
This commit is contained in:
@@ -8078,18 +8078,36 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
});
|
||||
}];
|
||||
} else if ([itemProvider hasItemConformingToTypeIdentifier:(NSString *)UTTypeMovie]) {
|
||||
[itemProvider loadItemForTypeIdentifier:(NSString *)UTTypeMovie options:nil completionHandler:^(id _Nullable object, NSError * _Nullable error) {
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
if ([object isKindOfClass:[NSURL class]]) {
|
||||
NSURL *url = object;
|
||||
if(url) {
|
||||
AVURLAsset *selectedVideo = [AVURLAsset assetWithURL:url];
|
||||
} else if ([itemProvider hasItemConformingToTypeIdentifier:@"public.movie"]) {
|
||||
[itemProvider loadFileRepresentationForTypeIdentifier:@"public.movie" completionHandler:^(NSURL *videoURL, NSError *error) {
|
||||
if (error) {
|
||||
NSLog(@"Fehler beim Laden des Videos: %@", error);
|
||||
} else {
|
||||
NSLog(@"Video URL: %@", [videoURL absoluteString]);
|
||||
NSString *dummy = [videoURL absoluteString];
|
||||
if(videoURL) {
|
||||
dispatch_sync(dispatch_get_main_queue(), ^{
|
||||
AVURLAsset *selectedVideo = [AVURLAsset assetWithURL:videoURL];
|
||||
[self sendVideoAsset:selectedVideo isPhotoLibraryAsset:NO];
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
// NSData *videoData = [NSData dataWithContentsOfURL:videoURL];
|
||||
|
||||
// Hier können Sie mit dem geladenen videoData arbeiten
|
||||
// z.B. es in einem AVPlayer anzeigen oder auf einen Server hochladen
|
||||
}
|
||||
}];
|
||||
// [itemProvider loadItemForTypeIdentifier:(NSString *)UTTypeMovie options:nil completionHandler:^(id _Nullable object, NSError * _Nullable error) {
|
||||
// dispatch_async(dispatch_get_main_queue(), ^{
|
||||
// if ([object isKindOfClass:[NSURL class]]) {
|
||||
// NSURL *url = object;
|
||||
// if(url) {
|
||||
// AVURLAsset *selectedVideo = [AVURLAsset assetWithURL:url];
|
||||
// [self sendVideoAsset:selectedVideo isPhotoLibraryAsset:NO];
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// }];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user