Skip to content

Conversation

scribblemaniac
Copy link

This PR most importantly fixes the SRT download option, which was producing invalid output files with a . decimal separator rather than the correct , separator (fixes #118). Additionally this fixes several other errors in the SRT and WebVTT output when dealing with very large timestamps (see commit message for details). It also takes advantage of the fact that the hours are optional in WebVTT to save a couple of bytes on small timecodes < 1 hour.

There are several issues with using Date().toISOString():
- The hours field is mod 24
- The decimal separator is '.' which is correct for WebVTT but not for SRT
- The output string technically can be one of two formats, changing
  the substring range.
- No checks for >=100 hours, which is not supported in SRT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] SRT format is wrong?
1 participant