@tim-smart/timecode
TypeScript icon, indicating that this package has built-in type declarations

1.2.2 • Public • Published

@tim-smart/timecode

A Timecode utility class for working with SMPTE timecode.

API

Here is a copy of dist/index.d.ts:

export interface ITimecodeObject {
  hours: number;
  minutes: number;
  seconds: number;
  frames: number;
}
export declare type TTimecodeInput = string | ITimecodeObject;
export interface ITimecodeOptions {
  framerate?: number;
}
export declare class Timecode implements ITimecodeObject {
  hours: number;
  minutes: number;
  seconds: number;
  frames: number;

  constructor(input: TTimecodeInput | number, opts?: ITimecodeOptions);

  add(input: TTimecodeInput, subtract?: boolean): void;
  subtract(input: TTimecodeInput): void;
  frameCount(): number;
  toMilliseconds(): number;
  toSeconds(): number;
  toString(): string;
}

Package Sidebar

Install

npm i @tim-smart/timecode

Weekly Downloads

1

Version

1.2.2

License

MIT

Unpacked Size

10 kB

Total Files

7

Last publish

Collaborators

  • tim-smart