pub struct Media {Show 23 fields
pub id: Option<String>,
pub path: String,
pub kind: Option<FileKind>,
pub trim_start: Option<f64>,
pub trim_end: Option<f64>,
pub speed: Option<f64>,
pub preserve_pitch: Option<bool>,
pub loop: bool,
pub volume: Option<f32>,
pub muted: bool,
pub opacity: Option<f32>,
pub fade_in: Option<f64>,
pub fade_out: Option<f64>,
pub zoom: Option<[f32; 2]>,
pub blur: Option<f32>,
pub label: Option<String>,
pub at: Option<f64>,
pub duration: Option<f64>,
pub inset: Option<Inset>,
pub fit: Option<Fit>,
pub align: Option<Align>,
pub enter: Option<Motion>,
pub exit: Option<Motion>,
}Expand description
A video or still file.
Fields§
§id: Option<String>The node’s name, for other nodes to refer to.
path: StringThe file. It becomes the source’s locator and the export’s asset.
kind: Option<FileKind>What the file holds. Default: by its extension.
trim_start: Option<f64>Where in the file a video starts, in seconds.
trim_end: Option<f64>Where in the file a video ends, in seconds. Default: its end.
speed: Option<f64>Playback speed of a video: 2 plays it twice as fast. Default 1.
preserve_pitch: Option<bool>Keeps a video’s sound at its pitch when speed is not 1 (time-stretched instead of
resampled). Default true.
loop: boolPlays a video again from its start while the node lasts.
volume: Option<f32>Linear gain of a video’s sound. Default 1.
muted: boolSilences a video’s sound.
opacity: Option<f32>Opacity, 0..=1. Default 1.
fade_in: Option<f64>Seconds of fade in from transparent.
fade_out: Option<f64>Seconds of fade out to transparent.
zoom: Option<[f32; 2]>A slow zoom over the node’s length, [from, to], as multiples of the fitted size.
blur: Option<f32>A Gaussian blur’s radius, as a fraction of the picture’s shorter side.
label: Option<String>A label a comparison grid shows on the cell.
at: Option<f64>Seconds from the parent’s start (an overlay’s: the video’s). Ignored in a sequence.
duration: Option<f64>Length in seconds. Default: the node’s own length, else what its parent gives it.
inset: Option<Inset>Pixels kept clear inside the parent’s area: one number, or [top, right, bottom, left].
fit: Option<Fit>How a picture fills its area. Default contain.
align: Option<Align>Where in its area the picture or text lies. Default center.
enter: Option<Motion>How it comes in at its start.
exit: Option<Motion>How it goes out, ending at its end.