From Multiple Videos
This example demonstrates how to load multiple video files into VideoEditor SDK as a single video.
Load and combine video files#
Obtain the URLs for the videos you want to load from either the local file system or the app bundle. In our example we are loading videos from the app bundle.
Then create VideoSegment
objects from these URLs and pass them to a Video
constructor as segments
parameter in order to instantiate a video object.
Trim video segments#
The duration of individual VideoSegment
s can be trimmed when creating the input Video
which will then initialize the editor with a video composition with corresponding pretrimmed video clips. The user can still change this start and end time in the clip trim tool.
Initialize the editor#
This combined Video
object we now pass as videoAsset
to the VideoEditViewController
to instantiate the video editor.
Setting the current class as the delegate of the VideoEditViewController
allows us to implement export, cancellation and error handling there.