pub struct SSA {
pub info: SSAInfo,
pub styles: Vec<SSAStyle>,
pub events: Vec<SSAEvent>,
pub fonts: Vec<String>,
pub graphics: Vec<String>,
}Expand description
Contains the styles, events and info as well as a format mentioning whether it’s .ass or .ssa
Fields§
§info: SSAInfo§styles: Vec<SSAStyle>§events: Vec<SSAEvent>§fonts: Vec<String>§graphics: Vec<String>Implementations§
Source§impl SSA
impl SSA
Sourcepub fn to_srt(&self) -> SRT
pub fn to_srt(&self) -> SRT
Converts the SSAFile to a SRTFile. Due to .srt being a far less complex
format, most styles are being ignored.
Styling of the text can happen with {i1}aaa{i0} tags where i represents
the style and 0/1 represent the on/off triggers.
.srt supports HTML-like tags for i,b,u, representing italic, bold, underline.
If found, ssa specific triggers for those supported tags are replaced with their .srt alternatives.
Sourcepub fn to_vtt(self) -> VTT
pub fn to_vtt(self) -> VTT
Converts the SSAFile to a VTTFile.
Styling of the text can happen with {i1}aaa{i0} tags where i represents
the style and 0/1 represent the on/off triggers.
.vtt supports HTML-like tags for i,b,u, representing italic, bold, underline.
If found, ssa specific triggers for those supported tags are replaced with their .vtt alternatives.
In addition, if an SSAEvent has a related SSAStyle, the SSAStyle is converted to a VTTStyle that will be wrapped around the lines indicating it.