Force getFile to use highest quality videos

It looks like images are forced to be in high quality (see line 321) but videos aren't. This commit forces videos to be in high quality format
This commit is contained in:
Ivan Kuznetsov 2020-09-19 17:13:21 +03:00 committed by GitHub
parent e7a27ebc1d
commit 613d0c466e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -346,6 +346,7 @@ public class SwiftPhotoGalleryPlugin: NSObject, FlutterPlugin {
|| asset.mediaType == PHAssetMediaType.audio) { || asset.mediaType == PHAssetMediaType.audio) {
let options = PHVideoRequestOptions() let options = PHVideoRequestOptions()
options.isNetworkAccessAllowed = true options.isNetworkAccessAllowed = true
options.deliveryMode = .highQualityFormat
options.version = .current options.version = .current
manager.requestAVAsset(forVideo: asset, options: options, resultHandler: { (avAsset, avAudioMix, info) in manager.requestAVAsset(forVideo: asset, options: options, resultHandler: { (avAsset, avAudioMix, info) in