# Trim plugin

The video editor extension isn't included in the Pintura image editor product package, it's available as an upgrade on the [pricing page](/pintura/pricing/)

Please note that client-side video encoding is useful for encoding short videos, it's advised to use [server side encoding](/pintura/docs/v8/api/video-editor/server/) for content longer than a couple minutes.

The Redact, Frame, and Fill util are currently not supported when using the video extension.

[Live demo of Pintura with video editor extension](/pintura/video-editor/)

Use the Trim plugin to enable easy trimming and clipping of videos

The following properties are available on the trim util.

| Property                                                                  | Default value | Description                                                                     |
| ------------------------------------------------------------------------- | ------------- | ------------------------------------------------------------------------------- |
| [trimEnableSplit](#trimenablesplit)                                       | true          | Set to false to disable splitting and merging of clips.                         |
| [trimEnableFramePreview](#trimenableframepreview)                         | true          | Toggle frame preview control.                                                   |
| [trimEnableMediaClipper](#trimenablemediaclipper)                         | true          | Toggle media clipper control.                                                   |
| [trimEnablePlayPauseButton](#trimenableplaypausebutton)                   | true          | Toggle play/pause button.                                                       |
| [trimEnableMuteButton](#trimenablemutebutton)                             | true          | Toggle mute button.                                                             |
| [trimBeforeSetCurrentTime](#trimbeforesetcurrenttime)                     | undefined     | Hook to intercept frame indicator from being moved to a new time.               |
| [trimEnableUpdateCurrentTimeOnTrim](#trimenableupdatecurrenttimeontrim)   | false         | Set to true to update the current time indicator when dragging trim area edges. |
| [trimEnableMediaClipperRemoveButton](#trimenablemediaclipperremovebutton) | true          | Set to false to hide the remove button in the video clip section.               |

## trimEnableSplit

Set to `false` to disable splitting and merging of clips.

## trimEnableFramePreview

Toggle frame preview control.

## trimEnableMediaClipper

Toggle media clipper control.

## trimEnablePlayPauseButton

Toggle play/pause button.

## trimEnableMuteButton

Toggle mute button.

## trimBeforeSetCurrentTime

Hook to intercept frame indicator from being moved to a new time.

In this example we limit the current time position to the trim range.

```js
openDefaultEditor({
    src: 'my-video.mp4',
    trim: [[0.25, 0.75]],
    trimBeforeSetCurrentTime: (currentTime, { trim }) => {
        const [range] = trim;
        if (currentTime < range[0]) return range[0];
        if (currentTime > range[1]) return range[1];
        return currentTime;
    },
});
```

### trimEnableUpdateCurrentTimeOnTrim

Set to `true` to update the current time indicator when dragging trim area edges.

### trimEnableMediaClipperRemoveButton

Set to `false` to hide the remove button in the video clip section.

## Trim plugin exports

The Pintura Video module exports the following Trim plugin objects.

| Export                       | Description            |
| ---------------------------- | ---------------------- |
| plugin\_trim                 | The trim util view.    |
| plugin\_trim\_locale\_en\_gb | The trim util locales. |