How to convert SRT file timestamp into milliseconds

364 Views Asked by At

I am parsing an SRT file into an object and the schema is like this:

[{
    id: '1',
    startTime: '00:00:11,544',
    endTime: '00:00:12,682',
    text: 'Hello' 
}]

So, I will need a handy function to convert the timestamps into milliseconds for cross-referencing with my audio file.

Is this a standard timestamp? Can it be easily converted into a Date object?

0

There are 0 best solutions below