28 Mar 2014

WebVTT (vtt.js) on Nodejs

Good news! You can now use vtt.js on Nodejs. There are two different ways you can get it on npm:

  1. You can install the basic vtt.js package which just exports the WebVTT, VTTCue, and VTTRegion implementations into a nice Node package for you. Using this method you will have to provide your own window object for vtt.js to run on. See the docs for more information.
  2. You can install node-vtt which is a Node wrapper for vtt.js. node-vtt runs vtt.js on an instance of PhantomJS. This means that you don't have to provide your own window object for vtt.js since it will already be running in the context of a web page. It also provides a couple of convenience functions such as parseFile, processFile, and others. See the docs for more information.
- Tagged in mozilla, seneca college, open-source, and cdot.

comments powered by Disqus

Wow coding Copyleft Richard Eyre 2013

Code for this site can be found on GitHub.