From 613d0c466ea2d8e1fdf59e50c48a6eda9c312e10 Mon Sep 17 00:00:00 2001 From: Ivan Kuznetsov Date: Sat, 19 Sep 2020 17:13:21 +0300 Subject: [PATCH] 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 --- ios/Classes/SwiftPhotoGalleryPlugin.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/ios/Classes/SwiftPhotoGalleryPlugin.swift b/ios/Classes/SwiftPhotoGalleryPlugin.swift index b159441..1d51089 100644 --- a/ios/Classes/SwiftPhotoGalleryPlugin.swift +++ b/ios/Classes/SwiftPhotoGalleryPlugin.swift @@ -346,6 +346,7 @@ public class SwiftPhotoGalleryPlugin: NSObject, FlutterPlugin { || asset.mediaType == PHAssetMediaType.audio) { let options = PHVideoRequestOptions() options.isNetworkAccessAllowed = true + options.deliveryMode = .highQualityFormat options.version = .current manager.requestAVAsset(forVideo: asset, options: options, resultHandler: { (avAsset, avAudioMix, info) in