-
Notifications
You must be signed in to change notification settings - Fork 30
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
[Feature Suggestion] Ignore extra header lines #18
Comments
Hi @abstractvector, that sounds like a fine way to go about it and I'd be happy to merge a PR. |
@osk would you be happy if I go the route of exposing the fields as an extra top-level object called {
"valid": true,
"meta": {
"Kind": "captions",
"Language": "en"
},
"cues": [
// ..
]
} |
Looks like this is something being added via the webm project: It should be fine if |
@osk Sounds great! I'm not an expert on this topic by any means, so I appreciate the steer! I'll work on a PR for it. |
I'm using this module to ingest data from Google's YouTube Captions API. Unfortunately, the content it generates has extra lines after the opening
WEBVTT
line, for example:According to MDN, this is not allowed, however nonetheless it appears there. At the moment I'm solving this with a workaround to alter the string before passing it to
parse()
:Without this workaround, I receive an error:
Missing blank line after signature
. It would be preferable if this module could instead accept an option to ignore trailing signature lines. Looking at the code, this wouldn't have adverse effects on the parsing. Alternatively, these lines could be parsed and added as metadata to the parsed output.I'd be happy to issue a PR for this if you're comfortable with the approach, or if you have a better suggestion I can look at implementing that too.
The text was updated successfully, but these errors were encountered: