Skip to content

Commit

Permalink
Add grid merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Datt1994 committed May 14, 2020
1 parent 60e27a6 commit d663556
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion DPVideoMerger.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "DPVideoMerger"
s.version = "1.0.0"
s.version = "1.0.1"
s.summary = "Multiple videos merge in one video with manage scale and aspect ratio for Objective C."

# This description is used to generate tags and improve search results.
Expand Down
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,20 @@ $ pod install
[objAVPlayerVC.player play];
}];
}];

[DPVideoMerger gridMergeVideosWithFileURLs:fileURLs andVideoResolution:CGSizeMake(2000, 2000) andRepeatVideo:true completion:^(NSURL *mergedVideoURL, NSError *error) {
if (error) {
NSString *errorMessage = [NSString stringWithFormat:@"Could not merge videos: %@", [error localizedDescription]];
UIAlertController *alert = [UIAlertController alertControllerWithTitle:@"Error" message:errorMessage preferredStyle:UIAlertControllerStyleAlert];
[alert addAction:[UIAlertAction actionWithTitle:@"OK" style:UIAlertActionStyleDefault handler:^(UIAlertAction * _Nonnull action) {}]];
[self presentViewController:alert animated:YES completion:nil];
return;
}

AVPlayerViewController *objAVPlayerVC = [[AVPlayerViewController alloc] init];
objAVPlayerVC.player = [AVPlayer playerWithURL:mergedVideoURL];
[self presentViewController:objAVPlayerVC animated:YES completion:^{
[objAVPlayerVC.player play];
}];
}];
```

0 comments on commit d663556

Please sign in to comment.