Skip to main content
VESDK/iOS/Guides/Audio Overlays/Custom Libraries

Soundstripe Integration

VideoEditor SDK for iOS provides an integration for Soundstripe allowing easy integration of Soundstripe audio clips.

Soundstripe API#

VideoEditor SDK allows to easily integrate the Soundstripe API. As Soundstripe requires server-to-server communication, our predefined integration is based on endpoints that proxy their official API. For further reference, please take a look at the official Soundstripe documentation.

Integration#

In order to use the predefined integration, you first need to create a SoundstripeAudioProvider with your custom baseURL which can then be used to create a predefined SoundstripeAudioClipCategory.

The baseURL needs to proxy the official Soundstripe API and will be used to query and retrieve the songs via {baseURL}/v1/songs/.

let soundstripeProvider = SoundstripeAudioProvider(baseURL: "YOUR_SOUNDSTRIPE_PROXY")
let soundstripeCategory = SoundstripeAudioClipCategory(provider: soundstripeProvider)
let configuration = Configuration { builder in
let assetCatalog = AssetCatalog.defaultItems
assetCatalog.audioClips.append(soundstripeCategory)
builder.assetCatalog = assetCatalog
}

This category is searchable, while the search bar and pagination is provided by VideoEditor SDK. If no search has been performed an empty query will be used to provide a quick access to the most relevant content, ready to be inserted into the composition.

For further customization options, you can also use your SoundstripeAudioProvider with a custom AudioProviderCategory. Be sure to follow the official Soundstripe guidelines in this case.

let soundstripeProvider = SoundstripeAudioProvider(baseURL: "YOUR_SOUNDSTRIPE_PROXY")
let soundstripeCategory = AudioProviderCategory(title: "Soundstripe", imageURL: Bundle.main.url(forResource: "soundstripe", withExtension: "png")!, audioProvider: soundstripeProvider)
let configuration = Configuration { builder in
let assetCatalog = AssetCatalog.defaultItems
assetCatalog.audioClips.append(soundstripeCategory)
builder.assetCatalog = assetCatalog
}

Authentication#

In case you need authentication or any other headers for the communication with your endpoint, you can pass these to the SoundstripeAudioProvider:

let soundstripeProvider = SoundstripeAudioProvider(baseURL: "YOUR_SOUNDSTRIPE_PROXY", headers: ["token": "MY_TOKEN"])

Serialization#

In order to serialize and deserialize the AudioClips loaded via the SoundstripeAudioProvider, you will need to register an AssetResolver as for every other audio provider that uses AudioClips that are not included in the AssetCatalog. For Soundstripe, you can use our predefined SoundstripeAssetResolver which includes a SoundstripeAudioProvider for retrieving the serialized songs during deserialization. For further information, please take a look at the dedicated section.

let soundstripeProvider = SoundstripeAudioProvider(baseURL: "YOUR_SOUNDSTRIPE_PROXY", headers: ["token": "MY_TOKEN"])
let resolver = SoundstripeAssetResolver(provider: soundstripeProvider)
IMGLY.assetResolvers = [SoundstripeAssetResolver.identifier: resolver]

Custom integration#

If you want to implement your own integration of the Soundstripe API take a look at our Soundstripe code example. If you want to integrate another API, see the external audio provider section.