We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
func dismissPhotoPicker(withPHAssets: [PHAsset]) { let mutableImages: NSMutableArray! = [] for asset: PHAsset in withPHAssets { if asset.mediaType == .video{ print(" ") isSelectedImage = false let vData = Data(contentsOf: asset) PHImageManager.default().requestAVAsset(forVideo: asset, options: nil, resultHandler: { (asset, mix, nil) in let myAsset = asset as? AVURLAsset do { // myAsset is nilll here let videoData = try Data(contentsOf: (myAsset?.url)!) DatabaseManager.sharedInstance.sendImage(receiverId: self.msgSenderId, image: #imageLiteral(resourceName: "online"), imageName: "nil", isGroup: self.isGroup, isAudioRec: false, audioData: nil, isVideo: true, videoData: videoData) { (isSent) in if isSent{ self.view.makeToast("Sent") } } } catch { print("exception catch at block - while uploading video") } }) } } }
The text was updated successfully, but these errors were encountered:
@peekinternational
https://developer.apple.com/documentation/photokit/phimagemanager/1616935-requestavasset
func requestAVAsset(forVideo asset: PHAsset, options: PHVideoRequestOptions?, resultHandler: @escaping (AVAsset?, AVAudioMix?, [AnyHashable : Any]?) -> Void) -> PHImageRequestID
resultHandler return AVAsset. ( is not AVURLAsset )
Sorry, something went wrong.
No branches or pull requests
The text was updated successfully, but these errors were encountered: