allExportPresets
TypeScriptstatic allExportPresets(): Array<string>Swift declarationclass func allExportPresets() -> [String]class · iOS 4.0+ · SDK 27.1
class AVAssetExportSessionstatic allExportPresets(): Array<string>Swift declarationclass func allExportPresets() -> [String]static determineCompatibility(presetName: string, asset: AVAsset, outputFileType: (AVFileType) | null, handler: ((arg0: boolean) => void)): voidSwift declarationclass func compatibility(ofExportPreset presetName: String, with asset: AVAsset, outputFileType: AVFileType?) async -> Boolstatic exportPresets(asset: AVAsset): Array<string>Swift declarationclass func exportPresets(compatibleWith asset: AVAsset) -> [String]cancelExport(): voidSwift declarationfunc cancelExport()determineCompatibleFileTypes(handler: ((arg0: Array<AVFileType>) => void)): voidSwift declarationvar compatibleFileTypes: [AVFileType] { get async }estimateMaximumDuration(handler: ((arg0: _CoreMedia_CMTime, arg1: (NativeError) | null) => void)): voidSwift declarationvar estimatedMaximumDuration: CMTime { get async throws }estimateOutputFileLength(handler: ((arg0: number, arg1: (NativeError) | null) => void)): voidSwift declarationvar estimatedOutputFileLengthInBytes: Int64 { get async throws }exportAsynchronously(handler: (() => void)): voidSwift declarationfunc export() asyncstatic init(asset: AVAsset, presetName: string): (AVAssetExportSession) | nullSwift declarationinit?(asset: AVAsset, presetName: String)get asset(): AVAssetSwift declarationvar asset: AVAsset { get }get audioMix(): (AVAudioMix) | nullSwift declaration@NSCopying var audioMix: AVAudioMix? { get set }set audioMix(value: (AVAudioMix) | null)Swift declaration@NSCopying var audioMix: AVAudioMix? { get set }get audioTimePitchAlgorithm(): AVAudioTimePitchAlgorithmSwift declarationvar audioTimePitchAlgorithm: AVAudioTimePitchAlgorithm { get set }set audioTimePitchAlgorithm(value: AVAudioTimePitchAlgorithm)Swift declarationvar audioTimePitchAlgorithm: AVAudioTimePitchAlgorithm { get set }get audioTrackGroupHandling(): AVAssetTrackGroupOutputHandlingSwift declarationvar audioTrackGroupHandling: AVAssetTrackGroupOutputHandling { get set }set audioTrackGroupHandling(value: AVAssetTrackGroupOutputHandling)Swift declarationvar audioTrackGroupHandling: AVAssetTrackGroupOutputHandling { get set }get canPerformMultiplePassesOverSourceMediaData(): booleanSwift declarationvar canPerformMultiplePassesOverSourceMediaData: Bool { get set }set canPerformMultiplePassesOverSourceMediaData(value: boolean)Swift declarationvar canPerformMultiplePassesOverSourceMediaData: Bool { get set }get customVideoCompositor(): (SDKHandle) | nullSwift declarationvar customVideoCompositor: (any AVVideoCompositing)? { get }get directoryForTemporaryFiles(): (string) | nullSwift declarationvar directoryForTemporaryFiles: URL? { get set }set directoryForTemporaryFiles(value: (string) | null)Swift declarationvar directoryForTemporaryFiles: URL? { get set }get error(): (NativeError) | nullSwift declarationvar error: (any Error)? { get }get estimatedOutputFileLength(): numberSwift declarationvar estimatedOutputFileLength: Int64 { get }get fileLengthLimit(): numberSwift declarationvar fileLengthLimit: Int64 { get set }set fileLengthLimit(value: number)Swift declarationvar fileLengthLimit: Int64 { get set }get maxDuration(): _CoreMedia_CMTimeSwift declarationvar maxDuration: CMTime { get }get metadata(): (Array<AVMetadataItem>) | nullSwift declarationvar metadata: [AVMetadataItem]? { get set }set metadata(value: (Array<AVMetadataItem>) | null)Swift declarationvar metadata: [AVMetadataItem]? { get set }get metadataItemFilter(): (AVMetadataItemFilter) | nullSwift declarationvar metadataItemFilter: AVMetadataItemFilter? { get set }set metadataItemFilter(value: (AVMetadataItemFilter) | null)Swift declarationvar metadataItemFilter: AVMetadataItemFilter? { get set }get outputFileType(): (AVFileType) | nullSwift declarationvar outputFileType: AVFileType? { get set }set outputFileType(value: (AVFileType) | null)Swift declarationvar outputFileType: AVFileType? { get set }get outputURL(): (string) | nullSwift declarationvar outputURL: URL? { get set }set outputURL(value: (string) | null)Swift declarationvar outputURL: URL? { get set }get presetName(): stringSwift declarationvar presetName: String { get }get progress(): numberSwift declarationvar progress: Float { get }get shouldOptimizeForNetworkUse(): booleanSwift declarationvar shouldOptimizeForNetworkUse: Bool { get set }set shouldOptimizeForNetworkUse(value: boolean)Swift declarationvar shouldOptimizeForNetworkUse: Bool { get set }get status(): AVAssetExportSession_StatusSwift declarationvar status: AVAssetExportSession.Status { get }get supportedFileTypes(): Array<AVFileType>Swift declarationvar supportedFileTypes: [AVFileType] { get }get timeRange(): _CoreMedia_CMTimeRangeSwift declarationvar timeRange: CMTimeRange { get set }set timeRange(value: _CoreMedia_CMTimeRange)Swift declarationvar timeRange: CMTimeRange { get set }get videoComposition(): (AVVideoComposition) | nullSwift declaration@NSCopying var videoComposition: AVVideoComposition? { get set }set videoComposition(value: (AVVideoComposition) | null)Swift declaration@NSCopying var videoComposition: AVVideoComposition? { get set }configureForResumableExport(): Promise<AVAssetExportSession_ResumptionState>Swift declarationfunc configureForResumableExport() async -> AVAssetExportSession.ResumptionStateConfigures the export session for resumable export. This method validates that the export session's current configuration supports resumption and checks the temporary directory for any partial results from previous export attempts. Call this method after configuring all export settings (preset, output file type, etc.) and before calling `exportAsynchronously()`. - Returns: A `ResumptionState` indicating whether resumption is available and whether the export will resume from a previous state. - Note: Even if resumption is not available, you can still perform a normal (non-resumable) export by calling `exportAsynchronously()`. Example usage: ```swift let exportSession = AVAssetExportSession(asset: asset, presetName: .hevc1920x1080)! exportSession.outputFileType = .mov exportSession.outputURL = outputURL exportSession.directoryForTemporaryFiles = temporaryDirectory let state = await exportSession.configureForResumableExport() switch state { case .resumable(let isResuming): print("Export is resumable. Continuing from previous state: \(isResuming)") case .notResumable(let reason): print("Cannot perform resumable export with current configuration: \(reason)") } try await exportSession.export(to: outputURL, as: .mov) ```
export(url: string, fileType: AVFileType): Promise<void>Swift declaration@backDeployed(before: macOS 26.0, iOS 26.0, tvOS 26.0, visionOS 26.0)
final func export(to url: URL, as fileType: AVFileType, isolation: isolated (any Actor)? = #isolation) async throwsInitiates an asset export operation. Progress can be monitored using states(updateInterval:). Thrown errors may include: - CancellationError: export operation is cancelled - Parameters: - url: Indicates the URL of the export session's output. You may use UTType.preferredFilenameExtension to obtain an appropriate path extension for the fileType you have specified. For more information, see <UniformTypeIdentifiers/UTType.h> - fileType: Indicates the type of file to be written by the session.
states(updateInterval?: number): (SDKHandle) & (SDKHandle)Swift declarationfunc states(updateInterval: TimeInterval = .infinity) -> some Sendable & AsyncSequence<AVAssetExportSession.State, Never>
Monitor the progress of an asset export session - Parameter updateInterval: time interval between updates while in exporting state - Returns: sequence of asset export session progress states
1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.
AVAssetExportSession.init()
inherited init: cannot prove legal (class declares 1 custom initializer)