-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timestamps with one digit allowed #17
Comments
Well spotted. And this seems to have been a requirement since forever. However, I don't think it makes much sense given that one digit parses fine and seems perfectly reasonable? |
I tested this with Firefox and it parses a timestamp with one digit hour just fine, but completely skips a cue using short timestamp with one digit minute. |
Yeah, that's correct. Minutes have to be exactly two digits. (The specification also describes parser requirements. My implementation has a parser implementation per the specification and intertwined with that a validator.) |
But still, your parser accepts the one digit minutes like below, for example.
|
Apologies, that does seem like a bug. |
The hours (if present) also have to be at least two digits, but the validator currently doesn't check that. It marked my VTT as OK but then when I loaded it into AblePlayer (which recommends using your validator) it didn't load any captions past the hour mark. |
File a new issue on that? |
The spec requires that a WebVTT timestamp has two or more ASCII digits for hours (if non-zero) and two ASCII digits for minutes.
However, the validator accepts above input as valid. The first value length in a timestamp before the first colon is not checked.
The text was updated successfully, but these errors were encountered: