pub struct Captions {Show 13 fields
pub id: Option<String>,
pub cues: Vec<Cue>,
pub words: Vec<Cue>,
pub file: Option<String>,
pub srt: Option<String>,
pub vtt: Option<String>,
pub style: CaptionStyle,
pub max_chars: Option<u32>,
pub font_size: Option<f32>,
pub color: Option<Rgba>,
pub position: Option<f32>,
pub at: Option<f64>,
pub duration: Option<f64>,
}Expand description
Timed text.
Fields§
§id: Option<String>The node’s name, for other nodes to refer to.
cues: Vec<Cue>Cues as given, in seconds from the node’s start.
words: Vec<Cue>Words with their times, as speech recognition gives them; they are
grouped into cues of up to max_chars characters.
file: Option<String>A SubRip (.srt) or WebVTT (.vtt) file, read by the binding.
srt: Option<String>SubRip text.
vtt: Option<String>WebVTT text.
style: CaptionStyleHow the captions look. Default outline.
max_chars: Option<u32>The longest cue words are grouped into, in characters. Default 32 on a tall canvas, 42 on a wide one.
font_size: Option<f32>Font size in pixels. Default: the theme’s caption size.
color: Option<Rgba>Text color. Default: the theme’s.
position: Option<f32>Where the text’s middle lies, as a fraction of the canvas height. Default: the style’s, which depends on the canvas’s shape.
at: Option<f64>Seconds from the parent’s start (an overlay’s: the video’s). Ignored in a sequence, which places its children one after another.
duration: Option<f64>Length in seconds. Default: the node’s own (a video’s, a caption file’s), else what its parent gives it.