# @whiteguru/capacitor-plugin-video-editor

> Capacitor plugin to edit videos

Latest version **8.0.3** (published 2026-09-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install @whiteguru/capacitor-plugin-video-editor
pnpm add @whiteguru/capacitor-plugin-video-editor
yarn add @whiteguru/capacitor-plugin-video-editor
bun add @whiteguru/capacitor-plugin-video-editor
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; recently updated; high maintenance score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 8.0.3 |
| Published | 2026-09-23 |
| First published | 2021-11-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=16 |
| Dependencies | 0 |
| Unpacked size | 83.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 16 |
| Author | Manuel Rodríguez |
| Maintainers | dragermrb |
| Keywords | capacitor, plugin, native |

## Links

- npm: https://www.npmjs.com/package/@whiteguru/capacitor-plugin-video-editor
- Repository: https://github.com/dragermrb/capacitor-plugin-video-editor
- Issues: https://github.com/dragermrb/capacitor-plugin-video-editor/issues
- npm.io page: https://npm.io/package/@whiteguru/capacitor-plugin-video-editor

## Recent versions

- 8.0.3 (latest) — 2026-09-23
- 8.0.2 — 2026-05-15
- 8.0.1 — 2026-04-18
- 7.1.1 — 2026-03-01
- 7.1.0 — 2025-06-19
- 7.0.1 — 2025-03-31
- 6.1.2 — 2024-12-19
- 6.1.0 — 2024-07-11
- 6.0.1 — 2024-04-23
- 5.0.6 — 2023-11-13
- 5.0.5 — 2023-09-18
- 5.0.4 — 2023-08-10
- 5.0.3 — 2023-08-07
- 5.0.2 — 2023-08-06
- 5.0.1 — 2023-05-25
- … 15 more at https://npm.io/package/@whiteguru/capacitor-plugin-video-editor/versions

## README

# capacitor-plugin-video-editor

Capacitor plugin to edit videos

## Install (Capacitor 8.x)

```bash
npm install @whiteguru/capacitor-plugin-video-editor
npx cap sync
```

## Install (Capacitor 7.x)

```bash
npm install @whiteguru/capacitor-plugin-video-editor@^7.1.1
npx cap sync
```

## Install (Capacitor 6.x)

```bash
npm install @whiteguru/capacitor-plugin-video-editor@^6.1.2
npx cap sync
```

### or for Capacitor 5.x

```bash
npm install @whiteguru/capacitor-plugin-video-editor@^5.0.6
npx cap sync
```

### or for Capacitor 4.x

```bash
npm install @whiteguru/capacitor-plugin-video-editor@^4.0.4
npx cap sync
```

### or for Capacitor 3.x

```bash
npm install @whiteguru/capacitor-plugin-video-editor@^3.0.1
npx cap sync
```

## Android

This API requires the following permissions be added to your `AndroidManifest.xml`:

```xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"/>
```

You can also specify those permissions only for the Android versions where they will be requested:

```xml
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" android:maxSdkVersion="32"/>
```

The storage permissions are for reading video files.

Read about [Setting Permissions](https://capacitorjs.com/docs/android/configuration#setting-permissions) in the [Android Guide](https://capacitorjs.com/docs/android) for more information on setting Android permissions.

## Example

```typescript
import { VideoEditor, MediaFileResult } from '@whiteguru/capacitor-plugin-video-editor';

const sourceVideoPath = 'file:///var/mobile/Containers/Data/...../sourceVideo.mp4';

// Transcode with progress
const progressListener = await VideoEditor.addListener('transcodeProgress', (info) => console.log('info', info));

VideoEditor.edit({
  path: sourceVideoPath,
  transcode: {
    width: 720,
    height: 480,
    keepAspectRatio: true,
    fps: 30,
  },
  trim: {
    startsAt: 3 * 1000, // from 00:03
    endsAt: 10 * 1000, // to 00:10
  },
}).then(
  (mediaFileResult: MediaFileResult) => {
    progressListener.remove();

    console.log('mediaPath', mediaFileResult.file.path);
  },
  (error) => {
    console.error('error', error);
  },
);

// Thumbnail
VideoEditor.thumbnail({
  path: sourceVideoPath,
  width: 150,
  height: 150,
  at: 4 * 1000, // at 00:04
}).then(
  (thumbMediaFileResult: MediaFileResult) => {
    console.log('thumbPath', thumbMediaFileResult.file.path);
  },
  (error) => {
    console.error('error', error);
  },
);
```

## API

<docgen-index>

* [`edit(...)`](#edit)
* [`thumbnail(...)`](#thumbnail)
* [`addListener('transcodeProgress', ...)`](#addlistenertranscodeprogress-)
* [Interfaces](#interfaces)

</docgen-index>

<docgen-api>
<!--Update the source file JSDoc comments and rerun docgen to update the docs below-->

### edit(...)

```typescript
edit(options: EditOptions) => any
```

| Param         | Type                                                |
| ------------- | --------------------------------------------------- |
| **`options`** | <code><a href="#editoptions">EditOptions</a></code> |

**Returns:** <code>any</code>

--------------------


### thumbnail(...)

```typescript
thumbnail(options: ThumbnailOptions) => any
```

| Param         | Type                                                          |
| ------------- | ------------------------------------------------------------- |
| **`options`** | <code><a href="#thumbnailoptions">ThumbnailOptions</a></code> |

**Returns:** <code>any</code>

--------------------


### addListener('transcodeProgress', ...)

```typescript
addListener(eventName: 'transcodeProgress', listenerFunc: (info: ProgressInfo) => void) => Promise<PluginListenerHandle> & PluginListenerHandle
```

| Param              | Type                                                                     |
| ------------------ | ------------------------------------------------------------------------ |
| **`eventName`**    | <code>'transcodeProgress'</code>                                         |
| **`listenerFunc`** | <code>(info: <a href="#progressinfo">ProgressInfo</a>) =&gt; void</code> |

**Returns:** <code>any</code>

--------------------


### Interfaces


#### EditOptions

| Prop            | Type                                                          |
| --------------- | ------------------------------------------------------------- |
| **`path`**      | <code>string</code>                                           |
| **`trim`**      | <code><a href="#trimoptions">TrimOptions</a></code>           |
| **`transcode`** | <code><a href="#transcodeoptions">TranscodeOptions</a></code> |


#### TrimOptions

| Prop           | Type                | Description              |
| -------------- | ------------------- | ------------------------ |
| **`startsAt`** | <code>number</code> | StartsAt in milliseconds |
| **`endsAt`**   | <code>number</code> | EndsAt in milliseconds   |


#### TranscodeOptions

| Prop                  | Type                 | Description                       |
| --------------------- | -------------------- | --------------------------------- |
| **`height`**          | <code>number</code>  |                                   |
| **`width`**           | <code>number</code>  |                                   |
| **`keepAspectRatio`** | <code>boolean</code> | Keep Aspect Ratio, default `true` |
| **`fps`**             | <code>number</code>  | Frames per second, default `30`   |


#### MediaFileResult

| Prop       | Type                                            |
| ---------- | ----------------------------------------------- |
| **`file`** | <code><a href="#mediafile">MediaFile</a></code> |


#### MediaFile

| Prop       | Type                | Description                                     |
| ---------- | ------------------- | ----------------------------------------------- |
| **`name`** | <code>string</code> | The name of the file, without path information. |
| **`path`** | <code>string</code> | The full path of the file, including the name.  |
| **`type`** | <code>string</code> | The file's mime type                            |
| **`size`** | <code>number</code> | The size of the file, in bytes.                 |


#### ThumbnailOptions

| Prop         | Type                | Description                                                          |
| ------------ | ------------------- | -------------------------------------------------------------------- |
| **`path`**   | <code>string</code> |                                                                      |
| **`at`**     | <code>number</code> | The time position where the frame will be retrieved in milliseconds. |
| **`width`**  | <code>number</code> |                                                                      |
| **`height`** | <code>number</code> |                                                                      |


#### ProgressInfo

| Prop           | Type                |
| -------------- | ------------------- |
| **`progress`** | <code>number</code> |


#### PluginListenerHandle

| Prop         | Type                      |
| ------------ | ------------------------- |
| **`remove`** | <code>() =&gt; any</code> |

</docgen-api>

---
_Source: https://npm.io/package/@whiteguru/capacitor-plugin-video-editor · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
