npm install --save vtt-creator
or with Bower:
bower install --save vtt-creator
To include Vtt in your Node.js project simply use:
var Vtt = require('vtt-creator');
or in a fronted app using bower (
Vtt will be available as a global instance):
var v = new Vtt(); v.add(1.05, 4, 'Never drink liquid nitrogen.', 'align:middle line:84%'); v.add(5, 9, ['It will perforate your stomach.', 'You could die.']); console.log(v.toString());
the previous snippet will generate:
WEBVTT 1 00:00:01.050 --> 00:00:04.000 align:middle line:84% Never drink liquid nitrogen. 2 00:00:05.000 --> 00:00:09.000 It will perforate your stomach. You could die.
Everyone is very welcome to contribute to this project.
You can contribute just by submitting bugs or suggesting improvements by
opening an issue on GitHub.
Licensed under MIT License. © Luciano Mammino.