pub struct SubtitleTiming {
pub sync: SubtitleSync,
pub offset_ms: i64,
pub offset_by: Option<String>,
pub offset_at: Option<i64>,
}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<i64>When, Unix seconds.
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 offset_stepped(&self, steps: i64) -> i64
pub fn offset_stepped(&self, steps: i64) -> i64
The offset steps presses of the ± control from this one
(negative: earlier), held within SubtitleTiming::MAX_OFFSET_MS.
Trait Implementations§
Source§impl Clone for SubtitleTiming
impl Clone for SubtitleTiming
Source§impl Debug for SubtitleTiming
impl Debug for SubtitleTiming
Source§impl<'de> Deserialize<'de> for SubtitleTiming
impl<'de> Deserialize<'de> for SubtitleTiming
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for SubtitleTiming
Source§impl PartialEq for SubtitleTiming
impl PartialEq for SubtitleTiming
Source§impl Serialize for SubtitleTiming
impl Serialize for SubtitleTiming
impl StructuralPartialEq for SubtitleTiming
Auto Trait Implementations§
impl Freeze for SubtitleTiming
impl RefUnwindSafe for SubtitleTiming
impl Send for SubtitleTiming
impl Sync for SubtitleTiming
impl Unpin for SubtitleTiming
impl UnsafeUnpin for SubtitleTiming
impl UnwindSafe for SubtitleTiming
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more