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
Please note that client-side video encoding is useful for encoding short videos, it's advised to use server side encoding for content longer than a couple minutes.
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.
Properties are still prefixed with image
to maintain backward compatibility, this will be corrected in version 9 of the editor.
Readonly video properties.
Property | Description |
---|---|
imageDuration |
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 |
---|---|---|
imageCurrentTime |
|
|
imageVolume |
|
The volume of the outputed video. Currently only supports a 0 value, when set to 0 the audio track is removed.
|
imageTrim |
|
An array of numbers to describe the ranges that should be trimmed. |
imageDuration
The duration of the loaded video. Is undefined
when an image is loaded.
imageVolume
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.
imageTrim
An array of fractions to describe the ranges that should be trimmed,
.5
meaning halfway through the video.
// No trimming
openDefaultEditor({
src: 'video.mp4',
imageTrim: [[0, 1]],
});
// Trim multiple segments
openDefaultEditor({
src: 'video.mp4',
imageTrim: [
[0, 0.25],
[0.75, 0.85],
],
});