Video Editor API includes 2 main core modules
Playback API
Export API
VideoEditorPlayable
is a core of Playback API. VideoEditorPlayable
is implemented in a similar way like other media players.
Main concepts
- Add video playlist you want to play
- Manage actions i.e. play, pause, change volume etc.
- Manage effects
- Handle events
Understanding these concepts can help you to implement any number of use cases. For example,
- Video trimming - allow the user to trim, merge any number of video sources
- Cover image selection - allow the user to select a video frame as a preview.
- Video editing - allow the user to edit video by adding various number of effects, audio
Visit Playback API quickstart to quickly integrate API into your project.
VEExport
is core of Export API. With Export API you can easily make any number of video files with various effects and audio.
Supported Features
- Multiple video in various resolutions
- Video with any number of various effects
- A separate audio file
- Slideshow - video made of images
- A GIF preview of a video
Visit Export API quickstart to quickly integrate API into your project.
- Banuba Face AR SDK
Optional
. - AV Kit
- Core media
- MetalKit
- Accelerate
CocoaPods is used to get iOS Video Editor API dependencies
Learn CocoaPods Getting Started Guide if you are new in CocoaPods.
❗ Important
It is required to have CocoaPods version1.11.0
or newer. Please check your versionpod --version
and upgrade.
The List of required Video Editor dependencies is in Podfile.
Complete the following steps to get Video Editor SDK dependencies using CocoaPods.
- Install CocoaPods using Homebrew
brew install cocoapods
- Initialize pods in your project folder
pod init
- Install Video Editor SDK pods
pod install
- Open
VEAPISample.xcworkspace
in Xcode and run the project.
Create new class VideoEditorApiModule for implementing access to VideoEditorService
and other features.
class VideoEditorApiModule {
let editor: VideoEditorService
init() {
guard let editor = VideoEditorService(token: AppDelegate.licenseToken) else {
fatalError("The token is invalid. Please check if token contains all characters.")
}
self.editor = editor
}
}
Next, initialize VideoEditorApiModule
in your AppDelegate class.
VideoEditorService
is a core class of API and SDK for initializing the product with the license token.
Instance editor
is null
when the license token is incorrect i.e. empty, truncated.
@main
class AppDelegate: UIResponder, UIApplicationDelegate {
...
+ static let videoEditorModule = VideoEditorApiModule()
static let licenseToken = <#Enter your license token#>
func application(
_ application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
) -> Bool {
+ AppDelegate.videoEditorModule.initFaceAR()
return true
}
}
❗ Important
It is required to initialize Face AR AppDelegate if your license includes Banuba Face AR SDK. Otherwise, you can skip this initialization.
It is highly recommended to check your license state before using API functionalities.
Use VideoEditorService.getLicenseState
method for checking the license state in your ViewController.
let editor = AppDelegate.videoEditorModule.editor
editor.getLicenseState(completion: { [weak self] isValid in
if isValid {
// ✅ License is active, all good
} else {
// ❌ Use of Video Editor is restricted. License is revoked or expired.
}
})
We highly recommend to learn Playback API quickstart and Export API quickstart guides to streamline your integration process.