Skip to main content

format_timestamp

Function format_timestamp 

Source
pub fn format_timestamp(t: MediaTime) -> String
Expand description

Format a MediaTime as a WebVTT timestamp hh:mm:ss.ttt (W3C WebVTT §4.3.1). Hours are always emitted: the grammar (hh:)?mm:ss.ttt makes hours optional, not forbidden, and always including them keeps this function total and monotonic without a >=1h special case.