I'm trying to enforce a duration limit for picked videos. It doesn't appear that there's a configuration option in PHPickerConfiguration unless I missed it.
I'm able to get the duration from the URL returned by loadFileRepresentation but it appears that this loads the entire file which somewhat defeats the point of limiting video size and can take a long time.
It also looks like I can use the local assetIdentifier but this requires initializing PHPickerConfiguration with a PHPhotoLibrary which requires asking the user for permission and complicates the whole flow when I just want them to pick a single file.
Is there a way to take advantage of PHPickerViewController and let the user choose a video and enforce a video limit without loading the entire file / requiring photo library permissions?
Thanks!