Skip to main content
Language

Show Editor

In order to open the editor you can either use the VideoEditorModal as shown in this example or use the callable static function VESDK.openEditor. For reference to the last method, please take a look at the dedicated guides here.

Create a VideoEditorModal#

In this example, we load a video from the bundle into the editor as the video property of the VideoEditorModal.

Handling visibility#

Since the VideoEditorModal represents a modally presented editor, you need to handle its visibility by using its visible property. If visible is set to true, the editor will be modally presented.

Handling events#

Using the onExport property allows us to register an event handler that is invoked when a user successfully exports an edited video. The result argument passed to the closure is of type VideoEditorResult and contains the data of the exported video.

The onCancel handler is called if the user cancels the editing process by clicking the cancel button inside the editor. If the export fails the onError handler is called.

In each of these cases, you need to reset the visible property of the modal to false. In this example, this is handled by the custom onFinish handler.

Next Steps#