Comments (4)
Hi @abstractvector, that sounds like a fine way to go about it and I'd be happy to merge a PR.
from node-webvtt.
@osk would you be happy if I go the route of exposing the fields as an extra top-level object called meta
? In the case of my example above, parse()
would return something like:
{
"valid": true,
"meta": {
"Kind": "captions",
"Language": "en"
},
"cues": [
// ..
]
}
from node-webvtt.
Looks like this is something being added via the webm project:
http://wiki.webmproject.org/webm-metadata/temporal-metadata/webvtt-metadata
but that's just after a few minutes of research.
It should be fine if webvtt.parse(input);
would get an options param so e.g. webvtt.parse(input, { meta: true });
would look for these meta fields and add them to the output. If the param is passed but no metadata found, it should return "meta": null
or something to that effect.
from node-webvtt.
@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.
from node-webvtt.
Related Issues (20)
- Hours timestamp should support more than 2 digits HOT 2
- [Suggestion] Add an option for parsing without <v> tags? HOT 2
- [Suggestion] TypeScript Conversion / Support HOT 8
- Remove commander dependency
- Spaces being added in meta header
- Automated testing / code coverage HOT 3
- [Bug] Parser parses empty cues HOT 1
- [Compiler] Rounding Error for long decimals HOT 3
- Support relaxed parsing HOT 3
- Can we convert Array to WebVTT? HOT 1
- VTT Subs go out of sync when translate from EN to ES. HOT 2
- Subtitles can be compiled in non-chronological order HOT 1
- Handle STYLE blocks HOT 8
- Does not compile metadata
- FEATURE: X-TIMESTAMP-MAP/MPEGTS metadata
- Library throws error with malformed webvtt file HOT 6
- my proposals HOT 6
- Add support for meta option in segmenter HOT 1
- Webvtt parser breaking with X-TIMESTAMP-MAP HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-webvtt.