2.0.6 • Published 6 months ago

@types/subtitle v2.0.6

Weekly downloads
643
License
MIT
Repository
github
Last release
6 months ago

Installation

npm install --save @types/subtitle

Summary

This package contains type definitions for subtitle (https://github.com/gsantiago/subtitle.js#readme).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/subtitle.

index.d.ts

// Type definitions for subtitle 2.0
// Project: https://github.com/gsantiago/subtitle.js#readme
// Definitions by: Low Jeng Lam <https://github.com/jenglamlow>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped

export interface subTitleType {
    start: number | string;
    end: number | string;
    text: string;
    setting?: string | undefined;
}

export function parse(srtOrVtt: string): subTitleType[];
export function stringify(captions: ReadonlyArray<subTitleType>): string;
export function stringifyVtt(captions: ReadonlyArray<subTitleType>): string;
export function resync(captions: ReadonlyArray<subTitleType>, time: number): subTitleType[];
export function toMS(timestamp: string): number;
export function toSrtTime(timestamp: number): string;
export function toVttTime(timestamp: number): string;

Additional Details

  • Last updated: Fri, 02 Jul 2021 22:33:09 GMT
  • Dependencies: none
  • Global values: none

Credits

These definitions were written by Low Jeng Lam.

2.0.5

6 months ago

2.0.4

7 months ago

2.0.6

6 months ago

2.0.3

3 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

6 years ago