Skip to main content
Introduced in VideoEditor SDK v2.17.0

Single tool use

When you want customers to perform only one action on the video, you can use single tool mode on VideoEditor SDK. Single tool mode supported tools are Trim, Composition, Transform, Filters, Adjustments, Focus, Overlays, and Brush.

To open the editor in single tool mode, two constraints need to be satisfied. You need to set singleToolMode to true (set by default) and make sure you only set one tool to be available in tools.

Configure menu items#

The tool menu items displayed in the main menu can be configured through the option and takes an array of Tools, so we will set the array to only include the tool item we want to use.

Make sure your license includes the tool you want to use. For further information on the option please refer to our dedicated section.

import { Configuration, Tool, VESDK } from "react-native-videoeditorsdk";
export const videoSingleToolExample = async (): Promise<void> => {
// Add a video from the assets directory.
const video = require("../../../../assets/vesdk/Skater.mp4");
try {
// Create a `Configuration` object.
const configuration: Configuration = {
// In this example, the single tool mode is enabled.
singleToolMode: true,
// To determine which tool is used, we need to assign it.
// For this example, we only use the transform tool.
tools: [Tool.TRANSFORM],
// Open the video editor and handle the export as well as any occuring errors.
const result = await VESDK.openEditor(video, configuration);
if (result != null) {
// The user exported a new video successfully and the newly generated video is located at ``.
} else {
// The user tapped on the cancel button within the editor.
} catch (error) {
// There was an error generating the video.