Edit Video
Deprication Warning
This document is archived and will be maintained only until September 15. Please refer to the latest documentation here for updated information.
The openEditScreen open video in editing screen after that on editing complete it return the status of onReady
Syntax
presentTruvideoSdkVideoEditorView(preset: preset) { trimmerResult in
// Print a success message along with the trimmer result
print("Successfully edited", trimmerResult)
}preset (required)
TruvideoSdkVideoEditorPreset is a struct comprising two parameters: videoURL and outputURL.
let preset = TruvideoSdkVideoEditorPreset(
videoURL: video,
outputURL: output
)Return Value
none
Example
import TruvideoSdkVideo
func edit(video: URL, output: URL) {
// Create a TruvideoSdkVideoEditorPreset with input and output URLs
let preset = TruvideoSdkVideoEditorPreset(
videoURL: video,
outputURL: output
)
// Present the TruvideoSdkVideoEditorView with the preset and handle the result
self.window.rootViewController?.presentTruvideoSdkVideoEditorView(preset: preset) { editionResult in
// Handle result - editionResult.editedVideoURL
// Print a success message along with the trimmer result
print("Successfully edited", editionResult)
}
}Last updated
Was this helpful?