pub struct Captions {Show 15 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 highlight: Option<Rgba>,
pub speakers: BTreeMap<String, SpeakerLook>,
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, 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.
highlight: Option<Rgba>The color karaoke and pop give the word being said. Default: the theme’s accent.
speakers: BTreeMap<String, SpeakerLook>Each speaker’s look, keyed by a WebVTT voice or a cue’s speaker; it overrides the
style.
position: Option<f32>Where the text’s middle lies, as a fraction of the canvas height. Default depends on the style and the canvas’s shape.
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.