Skip to main content

Configure Blur

VideoEditor SDK supports several configuration options for the FocusToolPanel allowing flexible adaptation to different needs and use cases.

Set available modes#

The default configuration includes several different modes. In this example, we only want to provide radial and mirrored blurs.

Note that optionList is an instance of DataSourceArrayList and allows other operations that can be used to modify the list.

class VideoFocusConfiguration(private val activity: AppCompatActivity) : Example(activity) {
override fun invoke() {
// In this example, we do not need access to the Uri(s) after the editor is closed
// so we pass false in the constructor
val settingsList = VideoEditorSettingsList(false)
// Set the source as the Uri of the video to be loaded
.configure<LoadSettings> {
it.source = activity.resourceUri(R.raw.skater)
settingsList.configure<UiConfigFocus> {
// By default the editor has all focus modes enabled
// For this example, only the given selection should
// be enabled.
val focusOptions = listOf(
// Start the video editor using VideoEditorBuilder
// The result will be obtained in onActivityResult() corresponding to EDITOR_REQUEST_CODE
.startActivityForResult(activity, EDITOR_REQUEST_CODE)
// Release the SettingsList once done
override fun onActivityResult(requestCode: Int, resultCode: Int, intent: Intent?) {
intent ?: return
if (requestCode == EDITOR_REQUEST_CODE) {
// Wrap the intent into an EditorSDKResult
val result = EditorSDKResult(intent)
when (result.resultStatus) {
EditorSDKResult.Status.CANCELED -> showMessage("Editor cancelled")
EditorSDKResult.Status.EXPORT_DONE -> showMessage("Result saved at ${result.resultUri}")
else -> {