I\'m trying to get two videos to play sequentially. I\'ve tried AVQueuePlayer but there\'s a huge \"burp\" between the two clips. I need to them to play without interruption.
Maybe you're using the wrong time insertion points and durations, both depends on actual video assets. I'd write something like this:
CMTime insertionPoint = kCMTimeZero;
NSError * error = nil;
composition = [AVMutableComposition composition];
asset = /* obtain asset #1 */
if (![composition insertTimeRange:CMTimeRangeMake(kCMTimeZero, asset.duration)
ofAsset:asset
atTime:insertionPoint
error:&error])
{
NSLog(@"error: %@",error);
}
insertionPoint = CMTimeAdd(insertionPoint, asset.duration);
asset = /* obtain asset #2 */
if (![composition insertTimeRange:CMTimeRangeMake(kCMTimeZero, asset.duration)
ofAsset:asset
atTime:insertionPoint
error:&error])
{
NSLog(@"error: %@",error);
}
...
/* playback stuff */