@transcrobes/subs-convert
Version:
Convert subtitles from one format to another
34 lines • 934 B
TypeScript
/**
* ***IMPORTANT***
* This entire file is copied from mccauli/node-captions
* We can't use that module because it uses fs,
* and we want this module to be compatible with browsers as much as nodejs
* */
interface SCCJsonCaption {
startTimeMicro: number;
endTimeMicro?: number;
frames: number;
popOn: boolean;
paintOn: boolean;
rollUpRows: number;
commands: string;
text: string;
id?: string;
}
/**
* Verifies a SCC file header, returns true/false
* @function
* @param {string} header - Header line to verify.
* @public
*/
declare function verify(header: string): boolean;
/**
* Converts the SCC file to a proprietary JSON format
* @function
* @param {string[]} lines - Entire SCC file content split by lines
* @public
*/
declare function toJSON(lines: string[]): SCCJsonCaption[];
export { verify, toJSON };
export type { SCCJsonCaption };
//# sourceMappingURL=scc_to_json.d.ts.map