A simple tool to convert timecodes
What do you expect?
Class to handle static function
Kind: global class
- Timecode
- .MillisecondsToTime(ms) ⇒
string
- .TimeToMilliseconds(time) ⇒
number
- .MillisecondsToTime(ms) ⇒
Converts millisecond to standard time code
Kind: static method of Timecode
Returns: string
- Converted Timecode Eg. 2:55:55
Param | Description |
---|---|
ms | Milliseconds in number |
Example
const time = Timecode.MillisecondsToTime(32000000)
Converts a standard time code to milliseconds.
Kind: static method of Timecode
Returns: number
- Milliseconds
Param | Description |
---|---|
time | The time code. Eg. 2:55:55 |
Example
const ms = Timecode.TimeToMilliseconds("4:30:00");
Tests are written in tape
To run them, just do:
npm run test
Any is welcomed. Just open a PR.