Function: trim()
ts
function trim(url, options): Promise<TrimResult>;Trim a video or audio file without showing any UI.
Parameters
| Parameter | Type | Description |
|---|---|---|
url | string | Local path or URL of the media. |
options | Partial<TrimOptions> | Trim range and output options. Times are in milliseconds. |
Returns
Promise<TrimResult>
The trimmed range and the output path.
Example
ts
const { outputPath } = await trim(videoUri, {
startTime: 5_000,
endTime: 25_000,
});