Video properties
The video editor extension isn't included in the Pintura image editor product package, it's available as an upgrade on the pricing page
The Redact, Frame, and Fill util are currently not supported when using the video extension.
A list of properties to read from and write to the current state of the video loaded in the editor.
Readonly video properties.
| Property | Description |
|---|---|
mediaDuration |
The duration of the loaded video in seconds. Is set to undefined when an image is loaded.
|
Video properties to update the video state.
| Property | Default value | Description |
|---|---|---|
mediaCurrentTime |
|
Get or set the current time in seconds, automatically clamps between 0 and video duration.
|
mediaVolume |
|
The volume of the outputed video. Currently only supports a 0 value, when set to 0 the audio track is removed.
|
mediaSpeed |
|
The playback speed of the output video. Requires a value above 0, defaults to 1.
|
mediaTrim |
|
An array of numbers to describe the ranges that should be trimmed. |
mediaMinDuration |
|
A minimum video duration in seconds. |
mediaMaxDuration |
|
A maximum video duration in seconds. |
mediaDuration
The duration of the loaded video. Is undefined when an image is loaded.
mediaSpeed
The playback speed of the output video. Requires a value above 0, defaults to 1, doesn't preserve audio pitch.
mediaMinDuration
The minimum required duration for video files.
mediaMaxDuration
The maximum required duration for video files. This will not prevent loading longer files, the Trim plugin will prevent outputing longer files by limiting the clip length.
mediaVolume
The volume of the outputed video. When set to 0 the audio track of the video is removed. When set to a value above 0 the volume of the output track is adjusted.
mediaTrim
An array of fractions to describe the ranges that should be trimmed,
.5 meaning halfway through the video.
// No trimming
openDefaultEditor({
src: 'video.mp4',
mediaTrim: [[0, 1]],
});
// Trim multiple segments
openDefaultEditor({
src: 'video.mp4',
mediaTrim: [
[0, 0.25],
[0.75, 0.85],
],
});