pub struct SubtitleTiming {
pub sync: SubtitleSync,
pub offset_ms: i64,
pub offset_by: Option<String>,
pub offset_at: Option<SystemTime>,
}Expand description
How an external text subtitle is timed: synced to the file or as it came, and moved by a manual offset on top. Set for everyone who plays the item.
Fields§
§sync: SubtitleSync§offset_ms: i64Added to every cue, ms, on top of the synced or original timing: positive shows the text later. What the track is served with already has it: a client does not add it again.
offset_by: Option<String>Who set the offset last, by display name; None while no one has.
offset_at: Option<SystemTime>When (Unix seconds on the wire).
Implementations§
Source§impl SubtitleTiming
impl SubtitleTiming
Sourcepub const MAX_OFFSET_MS: i64
pub const MAX_OFFSET_MS: i64
The most an offset moves a track, ms, either way: ten minutes.
Sourcepub const OFFSET_STEP_MS: i64 = 100
pub const OFFSET_STEP_MS: i64 = 100
One press of a player’s ± control, ms.
Sourcepub fn step_offset(offset_ms: i64, steps: i64) -> i64
pub fn step_offset(offset_ms: i64, steps: i64) -> i64
The offset steps presses of the ± control from offset_ms
(negative: earlier), held within SubtitleTiming::MAX_OFFSET_MS:
for a player that keeps the offset alone, without the timing.
Sourcepub fn offset_stepped(&self, steps: i64) -> i64
pub fn offset_stepped(&self, steps: i64) -> i64
SubtitleTiming::step_offset from this timing’s offset.