Support Xcode 16

This commit is contained in:
Isaac
2024-09-18 22:43:19 +08:00
parent ba352f9b6e
commit 46646a41a9
12 changed files with 44 additions and 26 deletions

View File

@@ -2477,10 +2477,11 @@ private func renderVideo(context: AccountContext, backgroundImage: UIImage, user
let layerInstruction = compositionLayerInstruction(for: compositionTrack, assetTrack: assetTrack)
instruction.layerInstructions = [layerInstruction]
guard let export = AVAssetExportSession(asset: composition, presetName: AVAssetExportPresetHighestQuality) else {
guard let exportValue = AVAssetExportSession(asset: composition, presetName: AVAssetExportPresetHighestQuality) else {
completion(nil)
return
}
nonisolated(unsafe) let export = exportValue
let videoName = UUID().uuidString
let exportURL = URL(fileURLWithPath: NSTemporaryDirectory()).appendingPathComponent(videoName).appendingPathExtension("mp4")