Skip to content

A simple Timecode utility class written in Typescript

License

Notifications You must be signed in to change notification settings

tim-smart/timecode

Repository files navigation

@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;
}

About

A simple Timecode utility class written in Typescript

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published