Skip to main content

Module vtt

Module vtt 

Source
Expand description

Web Video Text Tracks (WebVTT) subtitle format implementation.

This module exposes the VttFormat adapter that implements the SubtitleFormat trait. The actual logic is split across:

  • parser: parsing logic and the malformed-input disposition matrix
  • serializer: serialization logic
  • time: WebVTT timestamp parsing and formatting helpers

§Examples

use subx_cli::core::formats::{SubtitleFormat, vtt::VttFormat};
let vtt = VttFormat;
let content = "WEBVTT\n\n00:00:01.000 --> 00:00:03.000\nHello";
let subtitle = vtt.parse(content).unwrap();

Structs§

VttFormat
Subtitle format implementation for WebVTT.