subkit
Version:
The subtitles toolkit for converting between SRT, WebVTT, and FCPXML
8 lines (7 loc) • 503 B
TypeScript
import { Separator, SubSrt, SubVtt } from '../types.js';
export declare const timeToMs: (time: string) => number;
export declare const msToTime: (time: number, separator: Separator) => string;
export declare const parseTimeRow: (line: string) => [from: number, to: number];
export declare function toData(text: string, target: 'srt'): SubSrt;
export declare function toData(text: string, target: 'vtt'): SubVtt;
export declare const detectFormat: (text: string) => "srt" | "vtt" | "fcpxml" | undefined;