Skip to main content
Language

From App Bundle

VideoEditor SDK supports loading audio files from the app bundle.

In order to load audio clips from our bundle, we pass the bundle URL for our resource to the AudioClip constructor along with an identifier. AudioClip objects, additionally, hold metadata such as a thumbnailURL and the duration of the clip. Note that the AudioClip class is not optimized to handle remote resources, see next section on how to handle loading audio clips from remote resource.

We then need to add the audio clips to an AudioClipCategory object which holds the metadata of the category such as a preview image and a title.

Finally we can configure the assetCatalog by assigning an array of the audio clip categories we want to include to the audioClips property.