Skip to main content
Language:

Configure Adjustments

VideoEditor SDK supports several configuration options for the adjustments tool, allowing flexible adaptation to different needs and use cases. For a detailed explanation of how to configure different editor views, refer to this guide.

showResetButton#

By default, users can reset all the applied adjust operations. In our example, we hide the reset button.

items#

The set of available adjust tools can be configured by assigning an array to the items property. In our example, we only want to provide adjustments for brightness, contrast and saturation.

File:
import {
AdjustmentTool,
Configuration,
VESDK,
} from "react-native-videoeditorsdk";
export const videoAdjustmentsConfigurationExample = async (): Promise<void> => {
// Add a video from the assets directory.
const video = require("../../../../assets/vesdk/Skater.mp4");
// Create a `Configuration` object.
const configuration: Configuration = {
adjustment: {
// By default the editor always shows the reset button.
// For this example, the reset button should not be shown.
showResetButton: false,
// By default the editor shows all avaliable adjust tools.
// For this example, the editor should only show a small selection
// of them.
items: [
AdjustmentTool.BRIGHTNESS,
AdjustmentTool.CONTRAST,
AdjustmentTool.SATURATION,
],
},
};
try {
// 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 `result.video`.
console.log(result?.video);
} else {
// The user tapped on the cancel button within the editor.
return;
}
} catch (error) {
// There was an error generating the video.
console.log(error);
}
};