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
| Parameter | Type | Description |
|---|---|---|
filePath | string | Local path, file:// URI or (with the https FFmpegKit package) an HTTPS URL of the media to edit. |
config | EditorOptions | Editor options. Every field is optional. |
Returns
void
Example
ts
import { showEditor } from 'react-native-video-trim';
showEditor(videoUri, {
maxDuration: 30_000, // milliseconds
saveToPhoto: true,
});