Skip to content

Commit

Permalink
fix(ios): return full video duration on iOS (#1849)
Browse files Browse the repository at this point in the history
  • Loading branch information
helenaford committed Oct 16, 2021
1 parent 24d9cf8 commit 9fcd694
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ios/ImagePickerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ -(NSMutableDictionary *)mapVideoToAsset:(NSURL *)url error:(NSError **)error {
}

NSMutableDictionary *asset = [[NSMutableDictionary alloc] init];
asset[@"duration"] = @(roundf(CMTimeGetSeconds([AVAsset assetWithURL:videoDestinationURL].duration)));
asset[@"duration"] = [NSNumber numberWithDouble:CMTimeGetSeconds([AVAsset assetWithURL:videoDestinationURL].duration)];
asset[@"uri"] = videoDestinationURL.absoluteString;
asset[@"type"] = [ImagePickerUtils getFileTypeFromUrl:videoDestinationURL];

Expand Down

0 comments on commit 9fcd694

Please sign in to comment.