mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +00:00
Video: Increase compression when in extension
This commit is contained in:
parent
c7bd5a1d94
commit
096996c242
1 changed files with 6 additions and 1 deletions
|
@ -87,7 +87,12 @@ extension StatusEditor {
|
|||
func compressVideo(_ url: URL) async -> URL? {
|
||||
await withCheckedContinuation { continuation in
|
||||
let urlAsset = AVURLAsset(url: url, options: nil)
|
||||
guard let exportSession = AVAssetExportSession(asset: urlAsset, presetName: AVAssetExportPreset1920x1080) else {
|
||||
let presetName: String = if Bundle.main.bundlePath.hasSuffix(".appex") {
|
||||
AVAssetExportPreset1280x720
|
||||
} else {
|
||||
AVAssetExportPreset1920x1080
|
||||
}
|
||||
guard let exportSession = AVAssetExportSession(asset: urlAsset, presetName: presetName) else {
|
||||
continuation.resume(returning: nil)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue