Struct webvtt_parser::VttCueSettings
source · pub struct VttCueSettings {
pub vertical: Option<Vertical>,
pub line: Option<NumberOrPercentage>,
pub position: Option<u8>,
pub size: Option<u8>,
pub align: Option<Align>,
}Expand description
Cue settings are optional components used to position where the cue payload text will be displayed over the video. This includes whether the text is displayed horizontally or vertically. There can be zero or more of them, and they can be used in any order so long as each setting is used no more than once.
Fields§
§vertical: Option<Vertical>§line: Option<NumberOrPercentage>Specifies where text appears vertically. If vertical is set, line specifies where text appears horizontally. Value can be a line number:
- The line height is the height of the first line of the cue as it appears on the video.
- Positive numbers indicate top down.
- Negative numbers indicate bottom up.
Or value can be a percentage:
- Must be an integer (i.e., no decimals) between 0 and 100 inclusive.
- Must be followed by a percent sign (%).
position: Option<u8>Specifies where the text will appear horizontally. If vertical is set, position specifies where the text will appear vertically. Value is percentage.
size: Option<u8>Specifies the width of the text area. If vertical is set, size specifies the height of the text area. Value is percentage.
align: Option<Align>Specifies the alignment of the text. Text is aligned within the space given by the size cue setting if it is set.
Trait Implementations§
source§impl Clone for VttCueSettings
impl Clone for VttCueSettings
source§fn clone(&self) -> VttCueSettings
fn clone(&self) -> VttCueSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for VttCueSettings
impl Debug for VttCueSettings
source§impl Display for VttCueSettings
impl Display for VttCueSettings
source§impl PartialEq for VttCueSettings
impl PartialEq for VttCueSettings
source§fn eq(&self, other: &VttCueSettings) -> bool
fn eq(&self, other: &VttCueSettings) -> bool
self and other values to be equal, and is used
by ==.