Code Monkey home page Code Monkey logo

Comments (4)

osk avatar osk commented on September 27, 2024

Hi @abstractvector, that sounds like a fine way to go about it and I'd be happy to merge a PR.

from node-webvtt.

abstractvector avatar abstractvector commented on September 27, 2024

@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.

osk avatar osk commented on September 27, 2024

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.

abstractvector avatar abstractvector commented on September 27, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.