I am using UIImagePickerControllerDelegate to record a video and then open it in one of my arrays which is [PhAsset] type. I can't do it as can't find anything for converting to phasset from mediaURL.
extension EditViewController : UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIViewControllerTransitioningDelegate {
func imagePickerController(_ picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [UIImagePickerController.InfoKey : Any]) {
let videoURL = info[UIImagePickerController.InfoKey.mediaURL] as? URL //as? phAsset doesn't work
print("Video URL === \(videoURL)") //VideoURL of the recorded Video
//Need to append the video url into the last position of the array
self.newVideos.append(videoURL) // [PhAsset type array]