How can i retrieve or make a thumbnail image of the selected video to be used in a another view controller after the video has been selected by user?
func imagePickerController1(picker: UIImagePickerController, didFinishPickingMediaWithInfo info: [NSObject : AnyObject]) {
// 1
let mediaType = info[UIImagePickerControllerMediaType] as! NSString
// 2
dismissViewControllerAnimated(true) {
// 3
if mediaType == kUTTypeMovie {
let moviePlayer = MPMoviePlayerViewController(contentURL: info[UIImagePickerControllerMediaURL] as! NSURL)
self.presentMoviePlayerViewControllerAnimated(moviePlayer)
}
}
let destination = self.storyboard!.instantiateViewControllerWithIdentifier("FinializePost")
self.navigationController!.pushViewController(destination, animated: true);
}