Skip to content

Function: showEditor() ​

ts
function showEditor(filePath, config): void;

Open the full-screen trimmer editor for a video or audio file.

The call returns immediately. Follow what happens in the editor through the events on the default export (New Architecture) or the "VideoTrim" native event (Old Architecture); see VideoTrimEventMap.

Parameters ​

ParameterTypeDescription
filePathstringLocal path, file:// URI or (with the https FFmpegKit package) an HTTPS URL of the media to edit.
configEditorOptionsEditor options. Every field is optional.

Returns ​

void

Example ​

ts
import { showEditor } from 'react-native-video-trim';

showEditor(videoUri, {
  maxDuration: 30_000, // milliseconds
  saveToPhoto: true,
});

Released under the MIT License.